diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-02-24 16:34:54 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-02-24 16:34:54 +0000 |
commit | 31ab6e6263d3de832cba1124c2a74c28da47c8ce (patch) | |
tree | 63533823786e5de2a8c7918333f911f5f845ee10 | |
parent | b214d56da3e404107ee5e9512cee1e38e358ceb8 (diff) | |
download | lorry-controller-31ab6e6263d3de832cba1124c2a74c28da47c8ce.tar.gz |
Fix JSON field name in tests
-rw-r--r-- | yarns.webapp/020-status.yarn | 8 | ||||
-rw-r--r-- | yarns.webapp/030-queue-management.yarn | 6 | ||||
-rw-r--r-- | yarns.webapp/040-running-jobs.yarn | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/yarns.webapp/020-status.yarn b/yarns.webapp/020-status.yarn index 0a704e8..440a47a 100644 --- a/yarns.webapp/020-status.yarn +++ b/yarns.webapp/020-status.yarn @@ -9,10 +9,10 @@ it has no Lorry or Trove specs. GIVEN a running WEBAPP WHEN admin makes request GET /1.0/status THEN response is application/json - AND response has running-queue set to false - AND response has disk-free set - AND response has disk-free-mib set - AND response has disk-free-gib set + AND response has running_queue set to false + AND response has disk_free set + AND response has disk_free_mib set + AND response has disk_free_gib set AND static status page got updated FINALLY WEBAPP terminates diff --git a/yarns.webapp/030-queue-management.yarn b/yarns.webapp/030-queue-management.yarn index 5ee45e1..0f67e1c 100644 --- a/yarns.webapp/030-queue-management.yarn +++ b/yarns.webapp/030-queue-management.yarn @@ -13,11 +13,11 @@ new jobs, and later to start it again. SCENARIO admin can start and stop WEBAPP job scheduling GIVEN a running WEBAPP WHEN admin makes request GET /1.0/status - THEN response has running-queue set to false + THEN response has running_queue set to false WHEN admin makes request GET /1.0/start-queue AND admin makes request GET /1.0/status - THEN response has running-queue set to true + THEN response has running_queue set to true Further, the state change needs to be persistent across WEBAPP instances, so we kill the WEBAPP that's currently running, and start a @@ -28,7 +28,7 @@ new one, and verify that the `running-queue` status is still `true`. GIVEN a running WEBAPP WHEN admin makes request GET /1.0/status - THEN response has running-queue set to true + THEN response has running_queue set to true Finally, clean up. diff --git a/yarns.webapp/040-running-jobs.yarn b/yarns.webapp/040-running-jobs.yarn index 5c028a8..f254076 100644 --- a/yarns.webapp/040-running-jobs.yarn +++ b/yarns.webapp/040-running-jobs.yarn @@ -15,6 +15,9 @@ To start with, with an empty run-queue, nothing should be scheduled. WHEN admin makes request GET /1.0/give-me-job THEN response has job_id set to null + + 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. |