summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-10-09 09:59:31 +0100
committerLars Wirzenius <liw@liw.fi>2013-10-09 09:59:31 +0100
commite529aacf9e05d4196f02d5b4e9cf9317d00924f0 (patch)
tree60e87e1d85bd1f3e1e53f35cec1e95f8434618ee
parent85293dc7c322d94816d05fcffdff312828e28dde (diff)
downloadliw-gitano-acl-test-suite-e529aacf9e05d4196f02d5b4e9cf9317d00924f0.tar.gz
Test that non-admin can't push to master
-rw-r--r--git.liw.fi.yarn23
1 files changed, 23 insertions, 0 deletions
diff --git a/git.liw.fi.yarn b/git.liw.fi.yarn
index 0337dc7..69758a3 100644
--- a/git.liw.fi.yarn
+++ b/git.liw.fi.yarn
@@ -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+)
+ cd "$DATADIR/$MATCH_1/$MATCH_3"
+ git checkout "$MATCH_2"
+ attempt git push origin HEAD
+
Cgit access
-----------