summaryrefslogtreecommitdiff
path: root/yarns/900-local.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-04-06 21:38:43 +0300
committerLars Wirzenius <liw@liw.fi>2018-04-06 21:38:43 +0300
commit5aeef33219103eb5f39bfc0a79ed462f46a12420 (patch)
tree7fd5f2deb719a8c4ff68bf7eda7ee024006cf986 /yarns/900-local.yarn
parent63a8c15a46b73232fc2162807eced80e5e2c7296 (diff)
downloadick2-5aeef33219103eb5f39bfc0a79ed462f46a12420.tar.gz
Add: authentication URL to controller /version
Diffstat (limited to 'yarns/900-local.yarn')
-rw-r--r--yarns/900-local.yarn12
1 files changed, 12 insertions, 0 deletions
diff --git a/yarns/900-local.yarn b/yarns/900-local.yarn
index 4e9dbe1..9ec0dcb 100644
--- a/yarns/900-local.yarn
+++ b/yarns/900-local.yarn
@@ -49,6 +49,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
IMPLEMENTS GIVEN controller config uses (\S+) as artifact store
vars['artifact_store'] = get_next_match()
+ IMPLEMENTS GIVEN controller config uses (\S+) as authentication
+ vars['auth_url'] = get_next_match()
+
## Start and stop the controller
IMPLEMENTS GIVEN a running ick controller
@@ -57,6 +60,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
vars['gunicorn3.log'] = 'gunicorn3.log'
vars['port'] = random_free_port()
vars['url'] = 'http://127.0.0.1:{}'.format(vars['port'])
+ assert vars['auth_url'] is not None
config = {
'token-issuer': vars['issuer'],
'token-audience': vars['audience'],
@@ -68,6 +72,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
],
'statedir': vars['statedir'],
'artifact-store': vars['artifact_store'],
+ 'auth-url': vars['auth_url'],
}
env = dict(os.environ)
env['ICK_CONTROLLER_CONFIG'] = 'ick_controller.yaml'
@@ -116,6 +121,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
actual = obj['artifact_store']
assertEqual(actual, expected)
+ IMPLEMENTS THEN authentication URL is (\S+)
+ expected = get_next_match()
+ body = vars['body']
+ obj = json.loads(body)
+ actual = obj['auth_url']
+ assertEqual(actual, expected)
+
## Start and stop artifact store
IMPLEMENTS GIVEN artifact store config uses (\S+) at the blob directory