summaryrefslogtreecommitdiff
path: root/testing/library.yarn
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-01-02 14:48:11 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2017-01-02 14:48:11 +0000
commit6a663a99320d7748069173c8be1f50a5568b688b (patch)
tree48b75bc69b67c649ebc5e13d6bd7f6c73ebfc6b8 /testing/library.yarn
parente2d36d9ea5b0ff1b59b33300c2174b95b9d1b562 (diff)
downloadgitano-6a663a99320d7748069173c8be1f50a5568b688b.tar.gz
Simplify yarns which create alice/main to use a new implementation
Diffstat (limited to 'testing/library.yarn')
-rw-r--r--testing/library.yarn16
1 files changed, 15 insertions, 1 deletions
diff --git a/testing/library.yarn b/testing/library.yarn
index 03971cf..7d72ffb 100644
--- a/testing/library.yarn
+++ b/testing/library.yarn
@@ -26,6 +26,21 @@ Managing the fake unix users
IMPLEMENTS WHEN ([a-z][a-z0-9]*) uses their ssh public key called ([a-z][a-z0-9]*) as stdin
cp "$DATADIR/user-home-$MATCH_1/.ssh/$MATCH_2.pub" "$DATADIR/stdin"
+ IMPLEMENTS GIVEN ([a-z][a-z0-9]*),? using ([a-z][a-z0-9_-]*),? adds a new user ([a-z][a-z0-9_-]*), with a key called ([a-z][a-z0-9_-]*)
+ $GTT createunixuser $MATCH_3
+ $GTT createsshkey $MATCH_3 $MATCH_4
+ $GTT runcommand $MATCH_1 $MATCH_2 \
+ user add $MATCH_3 $MATCH_3@testinstance "$MATCH_3's real name" > $DATADIR/stdout 2> $DATADIR/stderr
+ $GTT runcommand $MATCH_1 $MATCH_2 \
+ as $MATCH_3 sshkey add default < \
+ $($GTT pubkeyfilename $MATCH_3 $MATCH_4) >> $DATADIR/stdout 2>> $DATADIR/stderr
+ if [ "$GTT_PROTO" = http ]; then
+ printf "%s" "$MATCH_3" | GTT_PROTO=ssh $GTT runcommand \
+ $MATCH_1 $MATCH_2 as $MATCH_3 passwd \
+ >> $DATADIR/stdout 2>> $DATADIR/stderr
+ fi
+
+
General instance management
---------------------------
@@ -233,4 +248,3 @@ GPG Keyring related helpers
IMPLEMENTS GIVEN gpg key ([0-9A-Fa-f]+) on stdin
$GTT gpg --armor --export $MATCH_1 > $DATADIR/stdin
-