diff options
Diffstat (limited to 'git.liw.fi.yarn')
-rw-r--r-- | git.liw.fi.yarn | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/git.liw.fi.yarn b/git.liw.fi.yarn index c04b26b..c39a0b7 100644 --- a/git.liw.fi.yarn +++ b/git.liw.fi.yarn @@ -38,6 +38,8 @@ The admin must be able to create and remove a user. GIVEN an ssh key for tstusr WHEN admin creates user tstusr THEN user tstusr exists + WHEN admin removes user tstusr + THEN user tstusr doesn't exist FINALLY remove user tstusr on server Implementations @@ -75,11 +77,20 @@ Verify a user exists on the server. IMPLEMENTS THEN user (\S+) exists user_exists "$MATCH_1" -Clean up user. +Remove a user. - IMPLEMENTS FINALLY remove user (\S+) on server - if run_gitano_as admin user del "$MATCH_1" 2> "$DATADIR/temp" + IMPLEMENTS WHEN (\S+) removes user (\S+) + user_del "$MATCH_1" "$MATCH_2" + +Verify a user doesn't exist on the server. + + IMPLEMENTS THEN user (\S+) doesn't exist + if user_exists "$MATCH_1" then - run_gitano_as admin user del "$MATCH_1" \ - $(awk '{ s = $2 } END { print s }' "$DATADIR/temp") + die "User $MATCH_1 exists on server, but shouldn't" fi + +Clean up user. + + IMPLEMENTS FINALLY remove user (\S+) on server + user_del admin "$MATCH_1" |