summaryrefslogtreecommitdiff
path: root/000.yarn
diff options
context:
space:
mode:
Diffstat (limited to '000.yarn')
-rw-r--r--000.yarn42
1 files changed, 42 insertions, 0 deletions
diff --git a/000.yarn b/000.yarn
index a313ae7..c052681 100644
--- a/000.yarn
+++ b/000.yarn
@@ -144,6 +144,23 @@ Ian makes a bug fix in Qvarn
THEN ian can push qvarn
FINALLY admin removes things that were created
+Ian force-pushes a change
+-----------------------------------------------------------------------------
+
+ SCENARIO Ian can force-push a change in Qvarn
+ WHEN admin creates user ian
+ AND admin creates group qvarndevs
+ AND admin adds ian to qvarndevs
+ AND admin creates repository qvarn
+ AND admin sets qvarn config writers to qvarndevs
+ THEN ian can clone qvarn
+ WHEN ian creates qvarn branch bugfix
+ AND ian changes qvarn branch bugfix
+ THEN ian can push qvarn
+ WHEN ian amends the latest commit in qvarn branch bugfix
+ THEN ian can force push qvarn
+ FINALLY admin removes things that were created
+
Steven can see Qvarn, but not push changes
-----------------------------------------------------------------------------
@@ -383,6 +400,19 @@ WHEN a user changes a branch locally
cliapp.runcmd(['git', 'add', 'foo.txt'], cwd=dirname)
cliapp.runcmd(['git', 'commit', '-mfoo'], cwd=dirname)
+WHEN a user amends a commit
+-----------------------------------------------------------------------------
+
+ IMPLEMENTS WHEN (\S+) amends the latest commit in (\S+) branch (\S+)
+ user = helper.get_next_match()
+ repo = helper.get_next_match()
+ branch = helper.get_next_match()
+ dirname = helper.local_checkout_dirname(user, repo)
+ with open(os.path.join(dirname, 'foo.txt'), 'a') as f:
+ f.write('foo\n')
+ cliapp.runcmd(['git', 'checkout', branch], cwd=dirname)
+ cliapp.runcmd(['git', 'commit', '--amend', '-mamended commit'], cwd=dirname)
+
THEN a user can push all local branches
-----------------------------------------------------------------------------
@@ -393,6 +423,18 @@ THEN a user can push all local branches
dirname = helper.local_checkout_dirname(user, repo)
helper.git_as_checked(user, ['push', '--all', 'origin'], cwd=dirname)
+
+THEN a user can force push all local branches
+-----------------------------------------------------------------------------
+
+ IMPLEMENTS THEN (\S+) can force push (\S+)
+ user = helper.get_next_match()
+ repo = helper.get_next_match()
+ url = helper.repo_ssh_url(repo)
+ dirname = helper.local_checkout_dirname(user, repo)
+ helper.git_as_checked(user, ['push', '--force', '--all', 'origin'], cwd=dirname)
+ sys.exit(1)
+
THEN a user can push all local tags
-----------------------------------------------------------------------------