summaryrefslogtreecommitdiff
path: root/testing/02-commands-sshkey.yarn
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2017-01-02 12:11:56 +0000
committerRichard Maw <richard.maw@gmail.com>2017-01-02 12:34:26 +0000
commit40b9f6e0280053f1dbefddb3edc5000530b6269e (patch)
tree7f1585141e5df2bf47efe0a824815e0dc3d54059 /testing/02-commands-sshkey.yarn
parente4e4a4fc0dfcce2d2aea47a7f862e1b375e7e098 (diff)
downloadgitano-40b9f6e0280053f1dbefddb3edc5000530b6269e.tar.gz
testing: Reformat yarns
We got some weird indentations because some code editors normalise whitespace and do so to different levels. This also took the opportunity to re-justify the text too.
Diffstat (limited to 'testing/02-commands-sshkey.yarn')
-rw-r--r--testing/02-commands-sshkey.yarn59
1 files changed, 31 insertions, 28 deletions
diff --git a/testing/02-commands-sshkey.yarn b/testing/02-commands-sshkey.yarn
index ed470b6..7fdc73a 100644
--- a/testing/02-commands-sshkey.yarn
+++ b/testing/02-commands-sshkey.yarn
@@ -1,44 +1,46 @@
<!-- -*- markdown -*- -->
- SCENARIO user key management
- GIVEN a standard instance
+ SCENARIO user key management
+
+ GIVEN a standard instance
The key we authenticate with is displayed as part of `whoami`.
- WHEN testinstance adminkey runs whoami
- THEN stdout contains adminkey
+ WHEN testinstance adminkey runs whoami
+ THEN stdout contains adminkey
This information is also shown in `sshkey list`.
- WHEN testinstance adminkey runs sshkey list
- THEN the output contains adminkey
+ WHEN testinstance adminkey runs sshkey list
+ THEN the output contains adminkey
New keys can be added.
- GIVEN testinstance has keys called newkey
- WHEN testinstance uses their ssh public key called newkey as stdin
- AND testinstance adminkey runs sshkey add newkey
- THEN the output contains SSH authorised key file updated
+ GIVEN testinstance has keys called newkey
+ WHEN testinstance uses their ssh public key called newkey as stdin
+ AND testinstance adminkey runs sshkey add newkey
+ THEN the output contains SSH authorised key file updated
We should also be able to add keys with underscores and/or dashes in the tag
name.
- GIVEN testinstance has keys called testkey
- WHEN testinstance uses their ssh public key called testkey as stdin
- AND testinstance adminkey runs sshkey add test-key_
- THEN the output contains SSH authorised key file updated
+ GIVEN testinstance has keys called testkey
+ WHEN testinstance uses their ssh public key called testkey as stdin
+ AND testinstance adminkey runs sshkey add test-key_
+ THEN the output contains SSH authorised key file updated
Verify the new keys are listed for the user.
- WHEN testinstance adminkey runs sshkey list
- THEN the output contains newkey
- AND the output contains test-key_
+ WHEN testinstance adminkey runs sshkey list
+ THEN the output contains newkey
+ AND the output contains test-key_
We can delete the old key and proceed with the new key in future.
- WHEN testinstance newkey runs sshkey del adminkey
- THEN the output contains SSH authorised key file updated
- FINALLY the instance is torn down
+ WHEN testinstance newkey runs sshkey del adminkey
+ THEN the output contains SSH authorised key file updated
+
+ FINALLY the instance is torn down
@@ -46,24 +48,25 @@ When we interact with gitano through ssh it tracks which key was used,
which is convenient when a user has multiple keys
and it matters which key is being used.
- SCENARIO gitano key awareness
- ASSUMING gitano is being accessed over ssh
- GIVEN a standard instance
+ SCENARIO gitano key awareness
+ ASSUMING gitano is being accessed over ssh
+
+ GIVEN a standard instance
When using the `whoami` and `sshkey list` commands
gitano appends "[*]" to the entry for the key that is in use.
- WHEN testinstance adminkey runs sshkey list
- THEN the output contains adminkey.*\[\*\]$
+ WHEN testinstance adminkey runs sshkey list
+ THEN the output contains adminkey.*\[\*\]$
This is not just informational. Gitano uses this information
to prevent you removing the key that is being used to authenticate
as a protection against accidentally locking yourself out.
- WHEN testinstance adminkey, expecting failure, runs sshkey del adminkey
- THEN stderr contains is in use
+ WHEN testinstance adminkey, expecting failure, runs sshkey del adminkey
+ THEN stderr contains is in use
If it is necessary to remove a key,
then a new key must be added first and the delete must be issued with that key.
- FINALLY the instance is torn down
+ FINALLY the instance is torn down