tests: Support multiple HTTP server instances.
authorLudovic Courtès <ludo@gnu.org>
Thu, 12 Oct 2017 21:19:09 +0000 (23:19 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 12 Oct 2017 21:47:48 +0000 (23:47 +0200)
commit6ea10db973d861cd8774938e40151c0f8b2d266f
treed86b6ca502a946097c2a610158fbad4caa91260e
parente37415917c4758142c052cae46b3d84517b54ec2
tests: Support multiple HTTP server instances.

* guix/tests/http.scm (%http-server-socket): Turn into...
(open-http-server-socket): ... this procedure.
(http-server-can-listen?): New procedure.
(http-write, %http-server-lock, %http-server-ready)
(http-open, stub-http-server): Move to 'call-with-http-server' body.
(call-with-http-server): Add #:headers parameter.
(with-http-server): Add an additional pattern with headers.
* tests/derivations.scm: Use (http-server-can-listen?) instead
of (force %http-server-socket).
* tests/lint.scm: Likewise.
guix/tests/http.scm
tests/derivations.scm
tests/lint.scm