summaryrefslogtreecommitdiff
path: root/yarns.webapp/040-running-jobs.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarns.webapp/040-running-jobs.yarn')
-rw-r--r--yarns.webapp/040-running-jobs.yarn11
1 files changed, 9 insertions, 2 deletions
diff --git a/yarns.webapp/040-running-jobs.yarn b/yarns.webapp/040-running-jobs.yarn
index 2c4a076..7d5a319 100644
--- a/yarns.webapp/040-running-jobs.yarn
+++ b/yarns.webapp/040-running-jobs.yarn
@@ -22,13 +22,19 @@ To start with, with an empty run-queue, nothing should be scheduled.
WHEN admin makes request GET /1.0/list-running-jobs
THEN response has running_jobs set to []
-Add a Lorry spec to the run-queue, and request a job. We should get
-that job now.
+Add a Lorry spec to the run-queue, and request a job. We still
+shouldn't get a job, since the queue isn't set to run yet.
GIVEN Lorry file CONFGIT/foo.lorry with {"foo":{"type":"git","url":"git://foo"}}
WHEN admin makes request GET /1.0/read-configuration
AND admin makes request GET /1.0/give-me-job
+ THEN response has job_id set to null
+
+Enable the queue, and off we go.
+
+ WHEN admin makes request GET /1.0/start-queue
+ AND admin makes request GET /1.0/give-me-job
THEN response has job_id set to 1
AND response has path set to "upstream/foo"
@@ -67,6 +73,7 @@ we did for the successful job scenario.
AND a running WEBAPP
AND Lorry file CONFGIT/foo.lorry with {"foo":{"type":"git","url":"git://foo"}}
WHEN admin makes request GET /1.0/read-configuration
+ AND admin makes request GET /1.0/start-queue
AND admin makes request GET /1.0/give-me-job
THEN response has job_id set to 1
AND response has path set to "upstream/foo"