diff options
authorLars Wirzenius <>2013-10-06 22:30:46 +0100
committerLars Wirzenius <>2013-10-06 22:30:46 +0100
commitac3a471456954372fd1215583479aaaf7dc0a4f6 (patch)
parent9fb5ea9b83b989b4acbe63592984cb04633478a7 (diff)
Test that non-admin can't remove a repository
1 files changed, 11 insertions, 0 deletions
diff --git a/ b/
index c3b0dbb..1185597 100644
--- a/
+++ b/
@@ -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"