From 611ca829bf707d80723764633aa497c6aa360483 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 6 Oct 2013 10:20:39 +0100 Subject: Explicitly test that admin can test user removal --- git.liw.fi.yarn | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'git.liw.fi.yarn') 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" -- cgit v1.2.1