summaryrefslogtreecommitdiff
path: root/yarns.webapp/060-validation.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarns.webapp/060-validation.yarn')
-rw-r--r--yarns.webapp/060-validation.yarn22
1 files changed, 11 insertions, 11 deletions
diff --git a/yarns.webapp/060-validation.yarn b/yarns.webapp/060-validation.yarn
index 989c80b..91b3b54 100644
--- a/yarns.webapp/060-validation.yarn
+++ b/yarns.webapp/060-validation.yarn
@@ -47,7 +47,7 @@ validates for.
First of all, have WEBAPP read CONFGIT. This should succeed even if
the `lorry-controller.conf` file doesn't actually exist.
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "Configuration has been updated"
AND STATEDB is empty
@@ -55,14 +55,14 @@ Add an empty configuration file. This is different from a file
containing an empty JSON list. It should be treated as an error.
GIVEN a lorry-controller.conf in CONFGIT containing ""
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "ERROR"
AND STATEDB is empty
Add a syntactically invalid JSON file.
GIVEN a lorry-controller.conf in CONFGIT containing "blah blah blah"
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "ERROR"
AND STATEDB is empty
@@ -71,7 +71,7 @@ Replace the bad JSON file with one that has an unknown section (no
an artifact of how yarn steps are implemented and is OK.
GIVEN a lorry-controller.conf in CONFGIT containing "[{"foo": "bar"}]"
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "ERROR"
AND STATEDB is empty
@@ -79,7 +79,7 @@ What about a section that has a `type` field, but it's set to a
non-sensical value?
GIVEN a lorry-controller.conf in CONFGIT containing "[{"type": "BACKUPS!"}]"
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "ERROR"
AND STATEDB is empty
@@ -134,7 +134,7 @@ Firstly, some setup.
Make sure WEBAPP handles there not being any `.lorry` files.
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "has been updated"
AND STATEDB is empty
WHEN admin makes request GET /1.0/list-queue
@@ -143,7 +143,7 @@ Make sure WEBAPP handles there not being any `.lorry` files.
Add a `.lorry` file that contains broken JSON.
GIVEN Lorry file CONFGIT/notjson.lorry with THIS IS NOT JSON
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "has been updated"
AND STATEDB is empty
WHEN admin makes request GET /1.0/list-queue
@@ -152,7 +152,7 @@ Add a `.lorry` file that contains broken JSON.
Add a `.lorry` file that is valid JSON, but is not a dict.
GIVEN Lorry file CONFGIT/notadict.lorry with [1,2,3]
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "has been updated"
AND STATEDB is empty
WHEN admin makes request GET /1.0/list-queue
@@ -161,7 +161,7 @@ Add a `.lorry` file that is valid JSON, but is not a dict.
Add a `.lorry` that is a dict, but doesn't map keys to dicts.
GIVEN Lorry file CONFGIT/notadictofdicts.lorry with { "foo": 1 }
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "has been updated"
AND STATEDB is empty
WHEN admin makes request GET /1.0/list-queue
@@ -170,7 +170,7 @@ Add a `.lorry` that is a dict, but doesn't map keys to dicts.
Add a `.lorry` whose inner dict does not have a `type` field.
GIVEN Lorry file CONFGIT/notype.lorry with { "foo": { "bar": "yo" }}
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "has been updated"
AND STATEDB is empty
WHEN admin makes request GET /1.0/list-queue
@@ -180,7 +180,7 @@ Add a `.lorry` that is A-OK. This should work even when there are some
broken ones too.
GIVEN Lorry file CONFGIT/a-ok.lorry with { "foo": { "type": "git", "url": "git://example.com/foo" }}
- WHEN admin makes request POST /1.0/read-configuration with dummy=value
+ WHEN admin makes request POST /1.0/read-configuration
THEN response matches "has been updated"
WHEN admin makes request GET /1.0/list-queue
THEN response has queue set to ["upstream/foo"]