diff options
Diffstat (limited to 'yarns/500-build-fail.yarn')
-rw-r--r-- | yarns/500-build-fail.yarn | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/yarns/500-build-fail.yarn b/yarns/500-build-fail.yarn index 3373c2f..6ca06c6 100644 --- a/yarns/500-build-fail.yarn +++ b/yarns/500-build-fail.yarn @@ -1,6 +1,6 @@ <!-- -Copyright 2017-2018 Lars Wirzenius +Copyright 2017-2019 Lars Wirzenius This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by @@ -26,20 +26,24 @@ build step fails. Set up the controller. - GIVEN an RSA key pair for token signing - AND controller config uses statedir at the state directory - AND controller config uses https://blobs.example.com as artifact store - AND controller config uses https://auth.example.com as authentication - AND controller config uses https://notify.example.com as notify - AND an access token for user with scopes + GIVEN an access token for user with scopes + ... uapi_pipelines_get + ... uapi_pipelines_id_delete ... uapi_pipelines_post + ... uapi_projects_get + ... uapi_projects_id_delete ... uapi_projects_post ... uapi_projects_id_status_put ... uapi_projects_id_status_get ... uapi_projects_id_builds_get + ... uapi_workers_get + ... uapi_workers_id_delete ... uapi_workers_id_get ... uapi_builds_get + ... uapi_builds_id_delete ... uapi_builds_id_get + ... uapi_logs_get + ... uapi_logs_id_delete ... uapi_logs_id_get AND a running ick controller @@ -71,6 +75,7 @@ Register a worker. ... { ... } THEN result has status code 201 + AND worker id is OBELIX Trigger build. @@ -86,7 +91,7 @@ Worker wants work and gets the first step to run. ... "build_id": "rome/1", ... "build_number": 1, ... "log": "/logs/rome/1", - ... "worker": "obelix", + ... "worker": "${OBELIX}", ... "project": "rome", ... "parameters": {}, ... "action_id": "1", @@ -103,7 +108,7 @@ failure. ... { ... "build_id": "rome/1", ... "action_id": "1", - ... "worker": "obelix", + ... "worker": "${OBELIX}", ... "project": "rome", ... "exit_code": 1, ... "stdout": "", @@ -121,7 +126,7 @@ Worker is next told to notify end of build. ... "build_id": "rome/1", ... "build_number": 1, ... "log": "/logs/rome/1", - ... "worker": "obelix", + ... "worker": "${OBELIX}", ... "project": "rome", ... "parameters": {}, ... "action_id": "4", @@ -134,7 +139,7 @@ Worker is next told to notify end of build. ... { ... "build_id": "rome/1", ... "action_id": "4", - ... "worker": "obelix", + ... "worker": "${OBELIX}", ... "project": "rome", ... "exit_code": 0, ... "stdout": "", @@ -151,11 +156,11 @@ The build has ended, and there's no more work to do. User sees changed status. - WHEN user makes request GET /workers/obelix + WHEN user makes request GET /workers/${OBELIX} THEN result has status code 200 AND body matches ... { - ... "worker": "obelix", + ... "worker": "${OBELIX}", ... "doing": {} ... } @@ -170,7 +175,7 @@ There's a build with a log. ... "build_id": "rome/1", ... "build_number": 1, ... "log": "/logs/rome/1", - ... "worker": "obelix", + ... "worker": "${OBELIX}", ... "project": "rome", ... "parameters": {}, ... "graph": { @@ -211,7 +216,7 @@ There's a build with a log. ... "build_id": "rome/1", ... "build_number": 1, ... "log": "/logs/rome/1", - ... "worker": "obelix", + ... "worker": "${OBELIX}", ... "project": "rome", ... "parameters": {}, ... "graph": { @@ -248,4 +253,22 @@ There's a build with a log. AND result has header Content-Type: text/plain AND body text contains "eek!" + WHEN user makes request DELETE /projects/rome + AND user makes request DELETE /pipelines/construct + AND user makes request DELETE /workers/${OBELIX} + AND user makes request DELETE /builds/rome/1 + AND user makes request DELETE /logs/rome/1 + + WHEN user makes request GET /projects + THEN body matches {"projects":[]} + + WHEN user makes request GET /pipelines + THEN body matches {"pipelines":[]} + + WHEN user makes request GET /builds + THEN body matches {"builds":[]} + + WHEN user makes request GET /logs + THEN body matches {"log":[]} + FINALLY stop ick controller |