summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2016-09-24 15:41:43 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2016-09-24 15:41:43 +0100
commit01e48cf208805d6ed99595509c1beaf8e01a4d5e (patch)
tree3ea00bc30042c06c65b91fe412bce1001bbc222a
parent80d29f3c8644c42d0006b66fd63036ad2c0eb439 (diff)
downloadgitano-01e48cf208805d6ed99595509c1beaf8e01a4d5e.tar.gz
More keyring yarns
-rw-r--r--testing/02-commands-keyring.yarn45
1 files changed, 34 insertions, 11 deletions
diff --git a/testing/02-commands-keyring.yarn b/testing/02-commands-keyring.yarn
index 467364c..27a6ddf 100644
--- a/testing/02-commands-keyring.yarn
+++ b/testing/02-commands-keyring.yarn
@@ -14,22 +14,45 @@ a gitano-admin we have full access to the keyrings by default...
SCENARIO Verify empty keyring set
GIVEN a standard instance
- WHEN testinstance adminkey runs keyring list
- THEN stdout is empty
- AND stderr is empty
+ WHEN testinstance adminkey runs keyring list
+ THEN stdout is empty
+ AND stderr is empty
Now let's check that we can create a keyring and it'll show, and vanish again
when we remove it.
SCENARIO Verify keyrings come and go
GIVEN a standard instance
- WHEN testinstance adminkey runs keyring create jeff
- AND testinstance adminkey runs keyring list
- THEN stdout contains jeff
- AND stderr is empty
- WHEN testinstance adminkey runs keyring destroy jeff --force
- AND testinstance adminkey runs keyring list
- THEN stdout is empty
- AND stderr is empty
+ WHEN testinstance adminkey runs keyring create jeff
+ AND testinstance adminkey runs keyring list
+ THEN stdout contains jeff
+ AND stderr is empty
+ WHEN testinstance adminkey runs keyring destroy jeff --force
+ AND testinstance adminkey runs keyring list
+ THEN stdout is empty
+ AND stderr is empty
+
+More complex keyring operations
+===============================
+
+Now let's check that we can add our test key to the keyring. Our test key has
+the fingerprint `32CD66C9C4E07D2D2A48B9D8DAEE518EFD8A5932` and is available
+from our test GPG home.
+
+ SCENARIO Keyrings can gain and lose keys
+ GIVEN a standard instance
+ WHEN testinstance adminkey runs keyring create jeff
+ AND testinstance adminkey runs keyring list
+ THEN stdout contains jeff
+ AND stderr is empty
+ GIVEN gpg key 32CD66C9C4E07D2D2A48B9D8DAEE518EFD8A5932 on stdin
+ WHEN testinstance adminkey runs keyring import jeff
+ AND testinstance adminkey runs keyring show jeff
+ THEN stdout contains 32CD66C9C4E07D2D2A48B9D8DAEE518EFD8A5932
+ AND stderr is empty
+ WHEN testinstance adminkey runs keyring delkey jeff 32CD66C9C4E07D2D2A48B9D8DAEE518EFD8A5932 --force
+ AND testinstance adminkey runs keyring show jeff
+ THEN stdout is empty
+ AND stderr is empty
TODO: Add more tests when we have rule control to govern things a little more.