diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/publish.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/publish.scm b/tests/publish.scm index 3c80c50d51..c8f66b69cd 100644 --- a/tests/publish.scm +++ b/tests/publish.scm @@ -425,6 +425,23 @@ FileSize: ~a~%" (display "This file is not a valid store item." port))) (response-code (http-get (publish-uri (string-append "/nar/invalid")))))) +(test-equal "non-substitutable derivation" + 404 + (let* ((non-substitutable + (run-with-store %store + (gexp->derivation "non-substitutable" + #~(begin + (mkdir #$output) + (chdir #$output) + (call-with-output-file "foo.txt" + (lambda (port) + (display "bar" port)))) + #:substitutable? #f))) + (item (derivation->output-path non-substitutable))) + (build-derivations %store (list non-substitutable)) + (response-code (http-get (publish-uri + (string-append "/nar/" (basename item))))))) + (test-equal "/file/NAME/sha256/HASH" "Hello, Guix world!" (let* ((data "Hello, Guix world!") |