3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

publish: Add test for non-GET queries.

* tests/publish.scm ("non-GET query"): New test.
This commit is contained in:
Ludovic Courtès 2018-03-22 12:51:23 +01:00
parent 247384d069
commit c1cd155aa8
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -483,4 +483,12 @@ FileSize: ~a~%"
(let ((uri (publish-uri "/log/does-not-exist")))
(response-code (http-get uri))))
(test-equal "non-GET query"
'(200 404)
(let ((path (string-append "/" (store-path-hash-part %item)
".narinfo")))
(map response-code
(list (http-get (publish-uri path))
(http-post (publish-uri path))))))
(test-end "publish")