| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
* src/cuirass/http.scm (url-handler): Check whether REQUEST's method is
'GET, and return 405 if not.
|
|
|
|
| |
* tests/http.scm ("http")["cuirass-run"]: Run server with 'run-fibers'.
|
|
|
|
|
|
| |
This is a followup to commit c89c117c12792cbc4996035feb670c2535dcb105.
* tests/http.scm (build-query-result): Add #:derivation.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
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.scm ("spec->json-string"): Make expected result more
readable.
|
|
* src/cuirass/http.scm: New file.
* tests/http.scm: Likewise.
* Makefile.am (dist_pkgmodule_DATA, TESTS): Add them.
* configure.ac: Check for (json) module.
|