diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-03 15:27:00 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-03 15:27:00 +0200 |
commit | 2094d68053f606996b2f30a62a2ae4af06851ab6 (patch) | |
tree | 912e7eacde0d631028bbbbccd59e67470e2a9a4f /tests | |
parent | 410d386ea8c0c29829e08a2dcf838de3202e7024 (diff) | |
download | cuirass-2094d68053f606996b2f30a62a2ae4af06851ab6.tar cuirass-2094d68053f606996b2f30a62a2ae4af06851ab6.tar.gz |
http: Handle request parameters with no value.
Handle requests such as "/build/?nr" by ignoring parameters without any
associated value.
* src/cuirass/http.scm (request-parameters): Ignore silently parameters
without an associated value.
* tests/http.scm: Add a corresponding test case.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/http.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/http.scm b/tests/http.scm index 1bcd056..f1d6e46 100644 --- a/tests/http.scm +++ b/tests/http.scm @@ -255,6 +255,13 @@ (test-cuirass-uri "/api/latestbuilds?nr=1&jobset=gnu"))))) + (test-equal "/api/latestbuilds?nr&jobset=gnu" + 500 + (response-code + (http-get + (test-cuirass-uri + "/api/latestbuilds?nr&jobset=gnu")))) + (test-equal "/api/queue?nr=100" `("fake-2.0" ,(build-status scheduled)) (match (json-string->scm |