From 0238440bc56c7658feb658614644dd2223a86838 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 16 Oct 2017 19:00:20 +0300 Subject: Add: /workers endpoint --- yarns/300-workers.yarn | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'yarns/300-workers.yarn') diff --git a/yarns/300-workers.yarn b/yarns/300-workers.yarn index 473dd29..6386ae9 100644 --- a/yarns/300-workers.yarn +++ b/yarns/300-workers.yarn @@ -64,11 +64,11 @@ controller API. It doesn't actually talk to the worker itself. WHEN user makes request GET /workers THEN result has status code 200 - AND body matches { "projects": [] } + AND body matches { "workers": [] } WHEN user makes request POST /workers ... { - ... "workers": "obelix", + ... "worker": "obelix", ... "protocol": "ssh", ... "address": "obelix.ick.example", ... "user": "ick", @@ -79,7 +79,7 @@ controller API. It doesn't actually talk to the worker itself. THEN result has status code 201 AND body matches ... { - ... "workers": "obelix", + ... "worker": "obelix", ... "protocol": "ssh", ... "address": "obelix.ick.example", ... "user": "ick", @@ -93,9 +93,9 @@ controller API. It doesn't actually talk to the worker itself. THEN result has status code 200 AND body matches ... { - ... "projects": [ + ... "workers": [ ... { - ... "workers": "obelix", + ... "worker": "obelix", ... "protocol": "ssh", ... "address": "obelix.ick.example", ... "user": "ick", @@ -112,7 +112,7 @@ controller API. It doesn't actually talk to the worker itself. THEN result has status code 200 AND body matches ... { - ... "workers": "obelix", + ... "worker": "obelix", ... "protocol": "ssh", ... "address": "obelix.ick.example", ... "user": "ick", @@ -123,7 +123,7 @@ controller API. It doesn't actually talk to the worker itself. WHEN user makes request PUT /workers/obelix ... { - ... "workers": "obelix", + ... "worker": "obelix", ... "protocol": "local", ... "keywords": { ... "debian_codename": "unstable" @@ -132,7 +132,7 @@ controller API. It doesn't actually talk to the worker itself. THEN result has status code 200 AND body matches ... { - ... "workers": "obelix", + ... "worker": "obelix", ... "protocol": "local", ... "keywords": { ... "debian_codename": "unstable" @@ -144,7 +144,7 @@ controller API. It doesn't actually talk to the worker itself. THEN result has status code 200 AND body matches ... { - ... "workers": "obelix", + ... "worker": "obelix", ... "protocol": "local", ... "keywords": { ... "debian_codename": "unstable" -- cgit v1.2.1