summaryrefslogtreecommitdiff
path: root/yarns.webapp
diff options
context:
space:
mode:
authorAdam Coldrick <adam@sotk.co.uk>2016-10-06 22:54:29 +0100
committerAdam Coldrick <adam@sotk.co.uk>2016-10-06 23:14:53 +0100
commitdddd2e37953d795e4004b1d2722c25ec652135ad (patch)
treeb424b8cad6cbd9e9414405cac77d9791c668beea /yarns.webapp
parent04afe06bcd33729db0e6c8dd767edc9f399165eb (diff)
downloadlorry-controller-dddd2e37953d795e4004b1d2722c25ec652135ad.tar.gz
Add support for YAML lorries
This commit makes lorry-controller understand YAML lorry files. If the file cannot be parsed as YAML then we fall back to attempting to load it as JSON, before giving up on loading it completely. The test for broken JSON is modified to use a string which is invalid for both YAML and JSON. Change-Id: If83e2e44b38e6fb63dbf0b857e143fdcabab78ac
Diffstat (limited to 'yarns.webapp')
-rw-r--r--yarns.webapp/060-validation.yarn2
1 files changed, 1 insertions, 1 deletions
diff --git a/yarns.webapp/060-validation.yarn b/yarns.webapp/060-validation.yarn
index 076879b..29bc7ca 100644
--- a/yarns.webapp/060-validation.yarn
+++ b/yarns.webapp/060-validation.yarn
@@ -166,7 +166,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
+ GIVEN Lorry file CONFGIT/notjson.lorry with { THIS IS NOT JSON ]
WHEN admin makes request POST /1.0/read-configuration
THEN response matches "has been updated"
AND STATEDB is empty