diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-03-06 15:54:18 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-03-06 15:54:18 +0200 |
commit | 9dd22f489261cd37d10bbf3f126c57620f06974c (patch) | |
tree | a13d606f9be41843d8948d232c4663b0ae177839 /000.yarn | |
parent | b8b27c819f43353ca8acf3fb48ed348efdee3d74 (diff) | |
download | git.liw.fi-ruleset-tests-liw/forced.tar.gz |
snapshotliw/forced
Diffstat (limited to '000.yarn')
-rw-r--r-- | 000.yarn | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -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 ----------------------------------------------------------------------------- |