diff options
authorLars Wirzenius <>2013-10-09 09:59:31 +0100
committerLars Wirzenius <>2013-10-09 09:59:31 +0100
commite529aacf9e05d4196f02d5b4e9cf9317d00924f0 (patch)
parent85293dc7c322d94816d05fcffdff312828e28dde (diff)
Test that non-admin can't push to master
1 files changed, 23 insertions, 0 deletions
diff --git a/ b/
index 0337dc7..69758a3 100644
--- a/
+++ b/
@@ -119,6 +119,21 @@ repo.
FINALLY remove repository tstrepo on server
+Non-admin, however, shouldn't be able to push to master.
+ SCENARIO non-admin cannot push to master
+ ASSUMING no tstusr user exists on server
+ GIVEN an ssh key for tstusr
+ WHEN admin creates user tstusr
+ AND admin creates repository tstrepo
+ AND tstusr clones tstrepo over ssh
+ AND tstusr makes change to master in tstrepo
+ WHEN tstusr attempts to push master in tstrepo
+ THEN attempt failed with error matching "FIXME"
+ FINALLY remove repository tstrepo on server
Implementation sections
@@ -132,6 +147,7 @@ intentionally named to be quite generic so we don't need to have
multiple "foo failed with error..." steps.
IMPLEMENTS THEN attempt failed with error matching "(.*)"
+ echo "stderr of attempted command:"
cat "$DATADIR/attempt.stderr"
grep "$MATCH_1" "$DATADIR/attempt.stderr"
@@ -376,6 +392,13 @@ Push with tags.
git checkout "$MATCH_2"
git push --tags origin HEAD
+Attempt to push, when the outcome may be uncertain.
+ IMPLEMENTS WHEN (\S+) attempts to push (\S+) in (\S+)
+ git checkout "$MATCH_2"
+ attempt git push origin HEAD
Cgit access