diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-04-30 17:24:27 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-06-10 19:44:48 +0300 |
commit | fd3fd66a1db8925e5a9a3d34acdd213f49378877 (patch) | |
tree | 5246b011f1cd035417fbca0a361b78fc630b2317 /yarns/900-local.yarn | |
parent | 9759c2b51a1250aa345c21b7cc6b793f4965ac2d (diff) | |
download | ick2-fd3fd66a1db8925e5a9a3d34acdd213f49378877.tar.gz |
Add: notification service
Diffstat (limited to 'yarns/900-local.yarn')
-rw-r--r-- | yarns/900-local.yarn | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/yarns/900-local.yarn b/yarns/900-local.yarn index 40bf762..1318eb9 100644 --- a/yarns/900-local.yarn +++ b/yarns/900-local.yarn @@ -53,6 +53,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. IMPLEMENTS GIVEN controller config uses (\S+) as authentication vars['auth_url'] = get_next_match() + IMPLEMENTS GIVEN controller config uses (\S+) as notify + vars['notify_url'] = get_next_match() + assert vars['notify_url'] is not None + ## Start and stop the controller IMPLEMENTS GIVEN a running ick controller @@ -62,6 +66,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. vars['port'] = random_free_port() vars['url'] = 'http://127.0.0.1:{}'.format(vars['port']) assert vars['auth_url'] is not None + assert vars['notify_url'] is not None config = { 'token-issuer': vars['issuer'], 'token-audience': vars['audience'], @@ -74,7 +79,9 @@ 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'], + 'notify-url': vars['notify_url'], } + assert config['notify-url'] is not None env = dict(os.environ) env['ICK_CONTROLLER_CONFIG'] = 'ick_controller.yaml' yaml.safe_dump(config, open('ick_controller.yaml', 'w')) @@ -131,6 +138,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. actual = obj['auth_url'] assertEqual(actual, expected) + IMPLEMENTS THEN notify URL is (\S+) + expected = get_next_match() + body = vars['body'] + obj = json.loads(body) + actual = obj['notify_url'] + assertEqual(actual, expected) + ## Start and stop artifact store IMPLEMENTS GIVEN artifact store config uses (\S+) at the blob directory |