summaryrefslogtreecommitdiff
path: root/yarns/400-build.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-05 20:33:32 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-05 20:33:32 +0100
commit0f1d4e3d8cbd48a51fd19b63aa23e11a36ef7cbf (patch)
tree7853324dcbe25556b473f18064971f551960461a /yarns/400-build.yarn
parentb995dfa59347fdc8a86fca174d31bcca77439c5a (diff)
downloadick2-0f1d4e3d8cbd48a51fd19b63aa23e11a36ef7cbf.tar.gz
Fix: build scenario to match code
Diffstat (limited to 'yarns/400-build.yarn')
-rw-r--r--yarns/400-build.yarn29
1 files changed, 17 insertions, 12 deletions
diff --git a/yarns/400-build.yarn b/yarns/400-build.yarn
index 30e47c6..a316407 100644
--- a/yarns/400-build.yarn
+++ b/yarns/400-build.yarn
@@ -152,7 +152,6 @@ Worker reports some build output. Note the null exit code.
... "timestamp": "2017-10-27T17:08:49"
... }
THEN result has status code 201
- AND body matches { "result": "waiting for more" }
Still the same job, since the first build step didnt't finish.
@@ -160,11 +159,13 @@ Still the same job, since the first build step didnt't finish.
THEN result has status code 200
AND body matches
... {
+ ... "worker": "obelix",
... "project": "rome",
... "pipeline": "construct",
... "step": {
... "shell": "day 1"
- ... }
+ ... },
+ ... "step_index": 0
... }
Report the step is done, and successfully.
@@ -179,8 +180,7 @@ Report the step is done, and successfully.
... "stderr": "",
... "timestamp": "2017-10-27T17:08:49"
... }
- THEN result has status code 200
- AND body matches { "result": "next step awaits you" }
+ THEN result has status code 201
Now there's another step to do.
@@ -188,24 +188,30 @@ Now there's another step to do.
THEN result has status code 200
AND body matches
... {
+ ... "worker": "obelix",
... "project": "rome",
... "pipeline": "construct",
... "step": {
... "shell": "day 2"
- ... }
+ ... },
+ ... "step_index": 1
... }
User sees changed status.
- WHEN user makes request GET /projects/rome/pipelines/construct
+ WHEN user makes request GET /workers/obelix
THEN result has status code 200
AND body matches
... {
- ... "status": "running",
... "worker": "obelix",
- ... "step_number": 2,
- ... "step": {
- ... "shell": "day 2"
+ ... "doing": {
+ ... "worker": "obelix",
+ ... "project": "rome",
+ ... "pipeline": "construct",
+ ... "step_index": 1,
+ ... "step": {
+ ... "shell": "day 2"
+ ... }
... }
... }
@@ -221,8 +227,7 @@ Report it done.
... "stderr": "",
... "timestamp": "2017-10-27T17:08:49"
... }
- THEN result has status code 200
- AND body matches { "result": "no more steps" }
+ THEN result has status code 201
Now there's no more work to do.