summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlorry-controller-webapp10
-rw-r--r--yarns.webapp/040-running-jobs.yarn19
2 files changed, 29 insertions, 0 deletions
diff --git a/lorry-controller-webapp b/lorry-controller-webapp
index 759b0a9..000ded3 100755
--- a/lorry-controller-webapp
+++ b/lorry-controller-webapp
@@ -350,6 +350,16 @@ class StopQueue(LorryControllerRoute):
return 'Queue set to not run'
+class GiveMeJob(LorryControllerRoute):
+
+ http_method = 'GET'
+ path = '/1.0/give-me-job'
+
+ def run(self, **kwargs):
+ logging.debug('%s %s called', self.http_method, self.path)
+ return { 'job-id': None }
+
+
class WEBAPP(cliapp.Application):
def add_settings(self):
diff --git a/yarns.webapp/040-running-jobs.yarn b/yarns.webapp/040-running-jobs.yarn
new file mode 100644
index 0000000..ad70d28
--- /dev/null
+++ b/yarns.webapp/040-running-jobs.yarn
@@ -0,0 +1,19 @@
+Running jobs
+============
+
+This chapter contains tests that verify that WEBAPP schedules jobs,
+accepts job output, and lets the admin kill running jobs.
+
+
+Schedule a job
+--------------
+
+To start with, with an empty run-queue, nothing should be scheduled.
+
+ SCENARIO job scheduling
+ GIVEN a new git repository in CONFGIT
+ AND WEBAPP uses CONFGIT as its configuration directory
+ AND a running WEBAPP
+
+ WHEN admin makes request GET /1.0/give-me-job
+ THEN response has job-id set to null