diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-10-09 07:58:19 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-10-09 07:58:19 +0100 |
commit | b483769217555fadce5dc461d7fbf991b156c772 (patch) | |
tree | dd348be635f9a882b19fb90c76008ff0034aa217 /git.liw.fi.yarn | |
parent | 1e69db8e6e7f17c1278e170bd1410e9fb18210eb (diff) | |
download | liw-gitano-acl-test-suite-b483769217555fadce5dc461d7fbf991b156c772.tar.gz |
Test that admin can push to master in public repo
Diffstat (limited to 'git.liw.fi.yarn')
-rw-r--r-- | git.liw.fi.yarn | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/git.liw.fi.yarn b/git.liw.fi.yarn index 5c662ee..33f93f3 100644 --- a/git.liw.fi.yarn +++ b/git.liw.fi.yarn @@ -101,6 +101,16 @@ be able to remove the repository. FINALLY remove repository tstrepo on server AND remove user tstusr on server +The admin should should be able to push to any branch in a public +repo. + + SCENARIO admin can push to public repository + + WHEN admin creates repository tstrepo + AND admin clones tstrepo over ssh + AND admin makes change to master in tstrepo + THEN admin can push master in tstrepo + FINALLY remove repository tstrepo on server Implementation sections ======================= @@ -279,6 +289,10 @@ We also need to be able to check we can't clone. die "$MATCH_1 can clone $MATCH_2 over ssh, but shouldn't" fi +More variants of cloning: this is a WHEN rather than THEN. + + IMPLEMENTS WHEN (\S+) clones (\S+) over ssh + clone_with_ssh "$MATCH_1" "$MATCH_2" Repository removal ------------------ @@ -302,6 +316,45 @@ can try. IMPLEMENTS WHEN (\S+) attempts to remove repository (\S+) attempt destroy_repo "$MATCH_1" "$MATCH_2" +Repository changes +------------------ + +Make a change to a given branch, in a repository cloned by a specific +user. We don't really care about what the change is, just that it's +there. We also commit the change. If the branch doesn't exist yet, we +create it (dealing with empty repos without branches while doing so). + + IMPLEMENTS WHEN (\S+) makes change to (\S+) in (\S+) + cd "$DATADIR/$MATCH_1/$MATCH_3" + + # Create master if it doesn't exist. + if ! git branch | grep . + then + touch file.txt + git add file.txt + git commit -m "Initial commit" + fi + + # Create wanted branch, if missing, and change to it. + if ! git checkout "$MATCH_2" + then + git checkout -b "$MATCH_2" + fi + + date >> file.txt + git add file.txt + git commit -m "A change to file.txt" + +Repository pushing +------------------ + +A named user pushes a branch to a repository. + + IMPLEMENTS THEN (\S+) can push (\S+) in (\S+) + cd "$DATADIR/$MATCH_1/$MATCH_3" + git checkout "$MATCH_2" + git push origin HEAD + Cgit access ----------- |