From 224afe3b367cba9b978115e969e714c14c71caa6 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 24 Apr 2018 17:03:17 +0300 Subject: Change: GET /work, POST /worker use access token to identify worker --- yarns/500-build-fail.yarn | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'yarns/500-build-fail.yarn') diff --git a/yarns/500-build-fail.yarn b/yarns/500-build-fail.yarn index 3b29499..79d4be6 100644 --- a/yarns/500-build-fail.yarn +++ b/yarns/500-build-fail.yarn @@ -62,13 +62,12 @@ Add up a project and its pipelines. Register a worker. - GIVEN an access token for worker-manager with scopes + GIVEN an access token for obelix with scopes ... uapi_workers_post ... uapi_work_post - ... uapi_work_id_get - WHEN worker-manager makes request POST /workers with a valid token and body + ... uapi_work_get + WHEN obelix makes request POST /workers with a valid token and body ... { - ... "worker": "obelix" ... } THEN result has status code 201 @@ -80,7 +79,7 @@ Trigger build. Worker wants work and gets the first step to run. - WHEN worker-manager makes request GET /work/obelix + WHEN obelix makes request GET /work THEN result has status code 200 AND body matches ... { @@ -99,7 +98,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 with a valid token and body + WHEN obelix makes request POST /work with a valid token and body ... { ... "build_id": "rome/1", ... "worker": "obelix", @@ -114,7 +113,7 @@ failure. A build step failed, so now the build has ended, and there's no more work to do. - WHEN worker-manager makes request GET /work/obelix + WHEN obelix makes request GET /work THEN result has status code 200 AND body matches {} -- cgit v1.2.1