diff options
Diffstat (limited to 'yarns/900-remote.yarn')
-rw-r--r-- | yarns/900-remote.yarn | 59 |
1 files changed, 59 insertions, 0 deletions
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 @@ +<!-- + +Copyright 2017 Lars Wirzenius + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +--> + +# 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 |