From 4c5bfc6aae6bf4e608a5e675be075bc37b910b53 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 14 Oct 2017 18:35:58 +0300 Subject: Add: run yarns against locallly started instance, or remote --- yarns/900-remote.yarn | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 yarns/900-remote.yarn (limited to 'yarns/900-remote.yarn') diff --git a/yarns/900-remote.yarn b/yarns/900-remote.yarn new file mode 100644 index 0000000..8c5c8b7 --- /dev/null +++ b/yarns/900-remote.yarn @@ -0,0 +1,59 @@ + + +# Scenario step implementations for remote Ick + +## Authentication setup + + IMPLEMENTS GIVEN an RSA key pair for token signing + vars['private_key_file'] = os.environ['ICK_PRIVATE_KEY'] + assertTrue(os.path.exists(vars['private_key_file'])) + + IMPLEMENTS GIVEN an access token for scopes (.+) + scopes = get_next_match() + key = open(vars['private_key_file']).read() + argv = [ + os.path.join(srcdir, 'create-token'), + scopes, + ] + token = cliapp.runcmd(argv, feed_stdin=key) + write('token.jwt', token) + vars['issuer'] = 'localhost' + vars['audience'] = 'localhost' + +## Controller configuration + + IMPLEMENTS GIVEN controller config uses (\S+) at the state directory + vars['statedir'] = get_next_match() + +## Start and stop the controller + + IMPLEMENTS GIVEN a running ick controller + vars['url'] = os.environ['ICK_URL'] + + IMPLEMENTS WHEN user stops ick controller + pass + + IMPLEMENTS FINALLY stop ick controller + pass + +## Controller state inspection + + IMPLEMENTS THEN controller state directory contains project (\S+) + pass -- cgit v1.2.1