summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-01-02 16:22:11 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2017-01-02 16:26:21 +0000
commit89b0239ce662822bc4432f59e9663824bbaf5bfc (patch)
tree18018c23b33091e82f5bedb95e424664222cef4b /testing
parent23267884d1c127a062a91020e70085d7f807949e (diff)
downloadgitano-89b0239ce662822bc4432f59e9663824bbaf5bfc.tar.gz
Update the whoami yarn a little
Diffstat (limited to 'testing')
-rw-r--r--testing/02-commands-whoami.yarn35
1 files changed, 33 insertions, 2 deletions
diff --git a/testing/02-commands-whoami.yarn b/testing/02-commands-whoami.yarn
index 19debb0..157b8cd 100644
--- a/testing/02-commands-whoami.yarn
+++ b/testing/02-commands-whoami.yarn
@@ -1,12 +1,43 @@
<!-- -*- markdown -*- -->
+Who am I?
+=========
+
+A question which has long plagued philosophers is 'Who am I?' fortunately
+Gitano can answer that, for users it knows about at least.
+
SCENARIO user introspection
GIVEN a standard instance
AND testinstance, using adminkey, adds a new user alice, with a key called main
WHEN alice main runs whoami
+
+The output of `whoami` includes the user's name and email address
+
THEN stdout contains User name: alice
- THEN stdout contains Real name: alice's real name
- THEN stdout contains Email address: alice@testinstance
+ AND stdout contains Real name: alice's real name
+ AND stdout contains Email address: alice@testinstance
+
+Also it contains the list of ssh keys registered to the user.
+
+ THEN stdout contains main
+
+Also it contains a list of groups which the user is a member of.
+
+ WHEN testinstance adminkey runs whoami
+ THEN stdout contains gitano-admin
+
+ FINALLY the instance is torn down
+
+If the `whoami` command is being run over SSH then it marks the actively used
+SSH key, for ease of understanding how the person came to be authenticated as
+that user.
+
+ SCENARIO whoami marks ssh key
+ ASSUMING gitano is being accessed over ssh
+ GIVEN a standard instance
+
+ WHEN testinstance adminkey runs whoami
+ THEN stdout contains adminkey \[\*\]
FINALLY the instance is torn down