summaryrefslogtreecommitdiff
path: root/000.yarn
diff options
context:
space:
mode:
Diffstat (limited to '000.yarn')
-rw-r--r--000.yarn24
1 files changed, 20 insertions, 4 deletions
diff --git a/000.yarn b/000.yarn
index eb55f75..a9f5030 100644
--- a/000.yarn
+++ b/000.yarn
@@ -225,6 +225,12 @@ groups, and respositories.
THEN steven cannot push qvarn
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
+ THEN steven cannot clone ops/secrets
+ FINALLY admin removes things that were created
+
SCENARIO everyone can clone a public repository
WHEN admin creates repository qvarn
AND admin sets qvarn config public to yes
@@ -272,7 +278,6 @@ groups, and respositories.
cliapp.runcmd(['git', 'commit', '-mfoo'], cwd=dirname, env=env)
cliapp.runcmd(['git', 'push', 'origin', 'HEAD'], cwd=dirname, env=env)
-
IMPLEMENTS WHEN admin sets (\S+) config (\S+) to (\S+)
repo = helper.get_next_match()
key = helper.get_next_match()
@@ -284,9 +289,20 @@ groups, and respositories.
repo = helper.get_next_match()
url = helper.repo_ssh_url(repo)
dirname = helper.local_checkout_dirname(user, repo)
- helper.git_as(user, ['clone', url, dirname])
- cliapp.runcmd(['git', 'config', 'user.email', user], cwd=dirname)
- cliapp.runcmd(['git', 'config', 'user.name', user], cwd=dirname)
+ exit, out, err = helper.git_as(user, ['clone', url, dirname])
+ helper.assertEqual(exit, 0)
+ env = dict(os.environ)
+ env['GIT_SSH_COMMAND'] = helper.env_ssh_command(user)
+ cliapp.runcmd(['git', 'config', 'user.email', user], cwd=dirname, env=env)
+ cliapp.runcmd(['git', 'config', 'user.name', user], cwd=dirname, env=env)
+
+ IMPLEMENTS THEN (\S+) cannot clone (\S+)
+ user = helper.get_next_match()
+ repo = helper.get_next_match()
+ url = helper.repo_ssh_url(repo)
+ dirname = helper.local_checkout_dirname(user, repo)
+ exit, out, err = helper.git_as(user, ['clone', url, dirname])
+ helper.assertNotEqual(exit, 0)
IMPLEMENTS THEN we can clone (\S+) via the git protocol
repo = helper.get_next_match()