summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-07-26 10:37:51 +0300
committerLars Wirzenius <liw@liw.fi>2018-07-26 10:37:51 +0300
commit070edf9b2f55bdf50f84d2deb13a214031fce35d (patch)
treeec09dfba77478fd97f3356f5bcdd4d8baa335b33 /yarns
parent44abb5b581b33dad7309cc36f65e3b6649c8886d (diff)
downloadick2-070edf9b2f55bdf50f84d2deb13a214031fce35d.tar.gz
Change: upon triggering build, check project defines all parameters
Diffstat (limited to 'yarns')
-rw-r--r--yarns/400-build.yarn21
1 files changed, 20 insertions, 1 deletions
diff --git a/yarns/400-build.yarn b/yarns/400-build.yarn
index 1bd52fb..7f261ef 100644
--- a/yarns/400-build.yarn
+++ b/yarns/400-build.yarn
@@ -47,6 +47,7 @@ Add up a project with some named pipelines.
WHEN user makes request POST /pipelines with a valid token and body
... {
... "pipeline": "construct",
+ ... "parameters": ["foo"],
... "actions": [
... { "where": "host", "shell": "day 1" },
... { "where": "host", "shell": "day 2" }
@@ -63,7 +64,20 @@ Add up a project with some named pipelines.
... }
THEN result has status code 201
-Add a second project so we know each project gets its own work steps.
+Define another project that doesn't define the parameter for the
+pipeline. This should succeed, as we don't check parameters until a
+build starts, and the pipeline might not even exist at this time, and
+it may change before the build starts.
+
+ WHEN user makes request POST /projects with a valid token and body
+ ... {
+ ... "project": "bad_rome",
+ ... "parameters": {},
+ ... "pipelines": ["construct"]
+ ... }
+ THEN result has status code 201
+
+Add another project so we know each project gets its own work steps.
WHEN user makes request POST /projects with a valid token and body
... {
@@ -97,6 +111,11 @@ Trigger build of project that doesn't exist.
WHEN user makes request GET /projects/eldorado/+trigger
THEN result has status code 404
+Trigger build of project with missing parameter.
+
+ WHEN user makes request GET /projects/bad_rome/+trigger
+ THEN result has status code 404
+
Trigger build.
WHEN user makes request GET /projects/rome/+trigger