diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-03-05 14:14:09 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-03-05 14:14:09 +0200 |
commit | 2d4a63b00968ac5473e3b82b7c45e3f742a8e707 (patch) | |
tree | 8a2a4144f2fbdf41f96a298a4584bd13c59ed563 | |
parent | 3f765912c0a63f7c81a58f32c44507300608b973 (diff) | |
download | git.liw.fi-ruleset-tests-2d4a63b00968ac5473e3b82b7c45e3f742a8e707.tar.gz |
Add scenario to verify Steven can't push release tags
-rw-r--r-- | 000.yarn | 22 | ||||
-rw-r--r-- | yarnhelper.py | 3 |
2 files changed, 25 insertions, 0 deletions
@@ -240,6 +240,19 @@ groups, and respositories. THEN ian can push qvarn with tags FINALLY admin removes things that were created + SCENARIO Steven can't tag a Qvarn release + WHEN admin creates user steven + AND admin creates group qvarn-readers + AND admin creates group qvarn-writers + AND admin adds steven to qvarn-readers + AND admin creates repository qvarn + AND admin sets qvarn config readers to qvarn-readers + AND admin sets qvarn config writers to qvarn-writers + THEN steven can clone qvarn + WHEN steven tags qvarn master branch with qvarn-2.0 + THEN steven cannot push qvarn with tags + FINALLY admin removes things that were created + SCENARIO Steven can't clone ops/secrets WHEN admin creates user steven AND admin creates repository ops/secrets @@ -362,6 +375,15 @@ groups, and respositories. ['push', '--all', 'origin'], cwd=dirname) helper.assertNotEqual(exit, 0) + IMPLEMENTS THEN (\S+) cannot push (\S+) with tags + user = helper.get_next_match() + repo = helper.get_next_match() + dirname = helper.local_checkout_dirname(user, repo) + exit, out, err = helper.git_as( + user, + ['push', '--tags', 'origin'], cwd=dirname) + helper.assertNotEqual(exit, 0) + IMPLEMENTS WHEN (\S+) merges (\S+) branch (\S+) to (\S+) user = helper.get_next_match() repo = helper.get_next_match() diff --git a/yarnhelper.py b/yarnhelper.py index d132b88..25c1db1 100644 --- a/yarnhelper.py +++ b/yarnhelper.py @@ -20,6 +20,7 @@ import email import imaplib import os import subprocess +import sys import urlparse import cliapp @@ -162,6 +163,8 @@ class YarnHelper(object): def git_as_checked(self, user, args, **kwargs): # pragma: no cover exit, out, err = self.git_as(user, args, **kwargs) + sys.stdout.write('STDOUT from git:\n{}'.format(out)) + sys.stderr.write('STDERR from git:\n{}'.format(err)) self.assertEqual(exit, 0) def env_ssh_command(self, user): # pragma: no cover |