summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-01-02 15:24:09 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2017-01-02 15:26:12 +0000
commit4b5eb826dc1536cce5443f1e39b38d2f93af2031 (patch)
tree791008972c89964fe63824f209212ced6b97a16c /testing
parent68bfcaad34f19faa4c9b78edd17f2e5aff23715a (diff)
downloadgitano-4b5eb826dc1536cce5443f1e39b38d2f93af2031.tar.gz
Tidy up and split out sshkey scenarios a bit
Diffstat (limited to 'testing')
-rw-r--r--testing/02-commands-sshkey.yarn46
1 files changed, 35 insertions, 11 deletions
diff --git a/testing/02-commands-sshkey.yarn b/testing/02-commands-sshkey.yarn
index 7fdc73a..da8a309 100644
--- a/testing/02-commands-sshkey.yarn
+++ b/testing/02-commands-sshkey.yarn
@@ -1,6 +1,14 @@
<!-- -*- markdown -*- -->
- SCENARIO user key management
+SSH key management
+==================
+
+Gitano is (primarily) managed via SSH. This means that ssh keys are a critical
+part of a user's configuration in Gitano. SSH keys are used as the primary
+means by which to identify the user when they try and perform actions on the
+server.
+
+ SCENARIO ssh key basics
GIVEN a standard instance
@@ -21,28 +29,23 @@ New keys can be added.
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
-
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_
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
+ WHEN testinstance newkey runs whoami
+ THEN the output contains newkey
+ AND the output does not contain adminkey
FINALLY the instance is torn down
-
+SSH key tracking
+----------------
When we interact with gitano through ssh it tracks which key was used,
which is convenient when a user has multiple keys
@@ -70,3 +73,24 @@ 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
+
+Regression tests
+================
+
+At one point, there was a bug where key tags could not contain underscores
+and dashes properly. This was fixed and so we validate that here.
+
+ SCENARIO sshkey underscores and dashes
+ GIVEN a standard instance
+ AND testinstance has keys called testkey
+
+We should also be able to add keys with underscores and/or dashes in the tag
+name.
+
+ 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
+ WHEN testinstance adminkey runs sshkey list
+ THEN the output contains test-key_
+
+ FINALLY the instance is torn down