summaryrefslogtreecommitdiff
path: root/yarns/500-build-fail.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-19 18:11:34 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-19 18:11:34 +0100
commitdb4b1d3822daf0a0da0ba6e838231251950f3f2e (patch)
tree1384ce2356308d15cc2c466558f427dc6050f297 /yarns/500-build-fail.yarn
parent196e9c65b6ed1a488a7163148a75b72aea3d07fe (diff)
downloadick2-db4b1d3822daf0a0da0ba6e838231251950f3f2e.tar.gz
Add: scenario for testing unauthorized access
Diffstat (limited to 'yarns/500-build-fail.yarn')
-rw-r--r--yarns/500-build-fail.yarn13
1 files changed, 7 insertions, 6 deletions
diff --git a/yarns/500-build-fail.yarn b/yarns/500-build-fail.yarn
index cfa1a12..e0c35b0 100644
--- a/yarns/500-build-fail.yarn
+++ b/yarns/500-build-fail.yarn
@@ -30,8 +30,8 @@ Set up the controller.
AND controller config uses statedir at the state directory
AND an access token for user with scopes
... uapi_projects_post
- ... uapi_projects_id_pipeline_id_put
- ... uapi_projects_id_pipeline_id_get
+ ... uapi_projects_id_pipelines_id_put
+ ... uapi_projects_id_pipelines_id_get
... uapi_projects_id_builds_get
... uapi_workers_id_get
... uapi_builds_get
@@ -41,7 +41,7 @@ Set up the controller.
Add up a project.
- WHEN user makes request POST /projects
+ WHEN user makes request POST /projects with a valid token and body
... {
... "project": "rome",
... "pipelines": [
@@ -61,7 +61,8 @@ Register a worker.
GIVEN an access token for worker-manager with scopes
... uapi_workers_post
... uapi_work_post
- WHEN worker-manager makes request POST /workers
+ ... uapi_work_id_get
+ WHEN worker-manager makes request POST /workers with a valid token and body
... {
... "worker": "obelix"
... }
@@ -70,7 +71,7 @@ Register a worker.
Trigger build. First with an invalid status, then a real one.
WHEN user makes request PUT /projects/rome/pipelines/construct
- ... { "status": "triggered" }
+ ... with a valid token and body { "status": "triggered" }
THEN result has status code 200
Worker wants work and gets the first step to run.
@@ -93,7 +94,7 @@ Worker wants work and gets the first step to run.
Worker reports some build output. Note the exit code indicating
failure.
- WHEN worker-manager makes request POST /work
+ WHEN worker-manager makes request POST /work with a valid token and body
... {
... "build_id": 1,
... "worker": "obelix",