summaryrefslogtreecommitdiff
path: root/yarns.webapp/030-queue-management.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarns.webapp/030-queue-management.yarn')
-rw-r--r--yarns.webapp/030-queue-management.yarn35
1 files changed, 35 insertions, 0 deletions
diff --git a/yarns.webapp/030-queue-management.yarn b/yarns.webapp/030-queue-management.yarn
new file mode 100644
index 0000000..75b17e3
--- /dev/null
+++ b/yarns.webapp/030-queue-management.yarn
@@ -0,0 +1,35 @@
+Run queue management
+====================
+
+This chapter contains tests meant for managing the run-queue in
+WEBAPP.
+
+Start and stop job scheduling
+-----------------------------
+
+The administrator needs to be able to stop WEBAPP from scheduling any
+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
+
+ 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
+
+Further, the state change needs to be persistent across WEBAPP
+instances, so we kill the WEBAPP that's currently running, and start a
+new one, and verify that the `running-queue` status is still `True`.
+
+ WHEN WEBAPP is terminated
+ THEN WEBAPP isn't running
+
+ GIVEN a running WEBAPP
+ WHEN admin makes request GET /1.0/status
+ THEN response has running-queue set to True
+
+Finally, clean up.
+
+ FINALLY WEBAPP terminates