aboutsummaryrefslogtreecommitdiff
path: root/tests/http.scm
Commit message (Collapse)AuthorAge
* http: Reject methods other than GET.Ludovic Courtès2018-01-26
| | | | | * src/cuirass/http.scm (url-handler): Check whether REQUEST's method is 'GET, and return 405 if not.
* http: Run test within 'run-fibers'.Ludovic Courtès2018-01-26
| | | | * tests/http.scm ("http")["cuirass-run"]: Run server with 'run-fibers'.
* http: Adjust test to include #:derivation.Ludovic Courtès2018-01-25
| | | | | | This is a followup to commit c89c117c12792cbc4996035feb670c2535dcb105. * tests/http.scm (build-query-result): Add #:derivation.
* http: Implement /api/queue.Ludovic Courtès2018-01-23
| | | | | | | | * src/cuirass/http.scm (url-handler): Add /api/queue handler. * tests/http.scm ("http"): Add a BUILD2 and DERIVATION2, and rename BUILD and DERIVATION accordingly. ("/build/2", "/build/2/log/raw"): Rename to /42. ("/api/queue?nr=100"): New test.
* http: /build/N/log/raw redirects to /log.Ludovic Courtès2018-01-07
| | | | | | | | | | | This moves log handling responsibility to 'guix publish'. * src/cuirass/http.scm (handle-log-request): Remove. (url-handler): Change /log/raw URI handler to return 302 to /log/OUTPUT. * tests/http.scm (log-file-name): Remove, and remove code to create and delete it. ("fill-db"): Change #:log value. ("/build/1/log/raw"): Expect 302.
* cuirass: add Hydra compatible HTTP API.Mathieu Othacehe2017-09-08
| | | | | | | | | | | | | * doc/cuirass.texi (Sections)[Web API]: New section describing the HTTP API. * src/cuirass/http.scm (spec->json-string): Move it to utils.scm and rename it object->json-string. (object->json-scm): Move it utils.scm. (handle-*-request): New helpers procedures. (request-parameters): New procedure to parse a request query. (url-handler): Add new API's. * src/cuirass/utils.scm (object->json-scm, object->json-string): Exported procedures moved from http.scm. * tests/http.scm: Add various tests on new HTTP API.
* tests: Compare JSON objects instead of JSON strings.Ludovic Courtès2017-05-10
| | | | | | | This fixes a test failure with Guile 2.2. * tests/http.scm (hash-table-keys, hash-table=?): New procedures. ("spec->json-string"): Use it to compare the JSON objects.
* tests: http: Reformat expected result.Mathieu Lirzin2016-08-03
| | | | | * tests/http.scm ("spec->json-string"): Make expected result more readable.
* Add (cuirass http) module.Mathieu Lirzin2016-07-31
* src/cuirass/http.scm: New file. * tests/http.scm: Likewise. * Makefile.am (dist_pkgmodule_DATA, TESTS): Add them. * configure.ac: Check for (json) module.