From 070edf9b2f55bdf50f84d2deb13a214031fce35d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 26 Jul 2018 10:37:51 +0300 Subject: Change: upon triggering build, check project defines all parameters --- yarns/400-build.yarn | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'yarns') 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 -- cgit v1.2.1