summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-03-04 16:52:58 +0200
committerLars Wirzenius <liw@liw.fi>2017-03-04 16:52:58 +0200
commitdff01a025cbb6edd9e0ac8a48fb13edb23628305 (patch)
tree697c2b4171af3e9e6f61d8bbeb5f4d4bef5fab9b
parent5c25683f5b4b1401cf778e994f30c2df021d8d7e (diff)
downloadgit.liw.fi-ruleset-tests-dff01a025cbb6edd9e0ac8a48fb13edb23628305.tar.gz
Create and remove repositories
-rw-r--r--000.yarn25
1 files changed, 23 insertions, 2 deletions
diff --git a/000.yarn b/000.yarn
index 7cf5120..7a4429a 100644
--- a/000.yarn
+++ b/000.yarn
@@ -221,14 +221,14 @@ groups, and respositories.
AND we add tina to otherdevs
AND we add steven to staff
-<!--
-
WHEN we create repository qvarn
AND we create repository ops/secrets
AND we create repository ops/ansible
AND we create repository intrawiki
AND we create repository otherproject
+<!--
+
WHEN we set qvarn config writers to qvarndevs
AND we set qvarn config guests to qvarnguests
AND we set qvarn config public to yes
@@ -286,6 +286,12 @@ Use case: Steven updates internal wiki.
AND remove group otherdevs
AND remove group staff
+ AND remove repository qvarn
+ AND remove repository ops/secrets
+ AND remove repository ops/ansible
+ AND remove repository intrawiki
+ AND remove repository otherproject
+
# Scenario step implementations
IMPLEMENTS WHEN we run gitano (.+)
@@ -331,3 +337,18 @@ Use case: Steven updates internal wiki.
user = helper.get_next_match()
group = helper.get_next_match()
output = helper.gitano('group adduser {} {}'.format(group, user))
+
+ IMPLEMENTS WHEN we create repository (\S+)
+ repo = helper.get_next_match()
+ output = helper.gitano('create {}'.format(repo))
+
+ IMPLEMENTS FINALLY remove repository (\S+)
+ repo = helper.get_next_match()
+ try:
+ output = helper.gitano('destroy {}'.format(repo))
+ except cliapp.AppException:
+ pass
+ else:
+ last_line = output.splitlines()[-1]
+ token = last_line.split()[-1]
+ helper.gitano('destroy {} {}'.format(repo, token))