From 1fc41ad97411b435c512ba3a0de63929eda9c33d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 28 Jun 2019 08:00:28 +0300 Subject: Change: make yarns run against a remote Ick instance, not local --- yarns/900-remote.yarn | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'yarns/900-remote.yarn') diff --git a/yarns/900-remote.yarn b/yarns/900-remote.yarn index 3c0443c..5e84c13 100644 --- a/yarns/900-remote.yarn +++ b/yarns/900-remote.yarn @@ -21,22 +21,12 @@ along with this program. If not, see . ## Authentication setup - IMPLEMENTS GIVEN an RSA key pair for token signing - V['private_key_file'] = os.environ['ICK_PRIVATE_KEY'] - assertTrue(os.path.exists(V['private_key_file'])) - IMPLEMENTS GIVEN an access token for (\S+) with scopes (.+) user = get_next_match() - scopes = get_next_match() - key = open(V['private_key_file']).read() - argv = [ - os.path.join(srcdir, 'create-token'), - scopes, - ] - token = cliapp.runcmd(argv, feed_stdin=key) + scopes = get_next_match().split() + create_api_client(user, scopes) + token = get_api_token(user, scopes) store_token(user, token) - V['issuer'] = 'localhost' - V['audience'] = 'localhost' ## Controller configuration @@ -46,13 +36,14 @@ along with this program. If not, see . ## Start and stop the controller IMPLEMENTS GIVEN a running ick controller - V['url'] = os.environ['ICK_URL'] + V['url'] = os.environ['CONTROLLER'] IMPLEMENTS WHEN user stops ick controller pass IMPLEMENTS FINALLY stop ick controller - pass + for client_id in get_client_ids(): + delete_api_client(client_id) ## Controller state inspection -- cgit v1.2.1