summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-10-06 22:30:46 +0100
committerLars Wirzenius <liw@liw.fi>2013-10-06 22:30:46 +0100
commitac3a471456954372fd1215583479aaaf7dc0a4f6 (patch)
tree40b735672f8689f5ea96ecfeb82511d447cdc67c
parent9fb5ea9b83b989b4acbe63592984cb04633478a7 (diff)
downloadliw-gitano-acl-test-suite-ac3a471456954372fd1215583479aaaf7dc0a4f6.tar.gz
Test that non-admin can't remove a repository
-rw-r--r--git.liw.fi.yarn11
1 files changed, 11 insertions, 0 deletions
diff --git a/git.liw.fi.yarn b/git.liw.fi.yarn
index c3b0dbb..1185597 100644
--- a/git.liw.fi.yarn
+++ b/git.liw.fi.yarn
@@ -74,11 +74,16 @@ be able to remove the repository.
SCENARIO public repositories
ASSUMING no tstusr user exists on server
GIVEN an ssh key for tstusr
+
WHEN admin creates user tstusr
AND admin creates repository tstrepo
THEN admin can clone tstrepo using git
AND admin can clone tstrepo using ssh
AND tstusr can clone tstrepo using ssh
+
+ WHEN tstusr attempts to remove repository tstrepo
+ THEN attempt failed with error matching "You may not destroy repositories you do not own"
+
FINALLY remove repository tstrepo on server
AND remove user tstusr on server
@@ -245,3 +250,9 @@ At the end, we need to clean up repositories.
IMPLEMENTS FINALLY remove repository (\S+) on server
destroy_repo admin "$MATCH_1"
+
+A non-admin may try to remove a repository. It should fail, but they
+can try.
+
+ IMPLEMENTS WHEN (\S+) attempts to remove repository (\S+)
+ attempt destroy_repo "$MATCH_1" "$MATCH_2"