From e5788ebbe1f45a1088249b9138de17b330609712 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 5 Oct 2017 22:15:19 +0200 Subject: publish: Cache uncompressed nars as well. Fixes . Reported by Maxim Cournoyer . * guix/scripts/publish.scm (bake-narinfo+nar): When COMPRESSION is 'none, write NAR instead of doing nothing. (make-request-handler): Use 'render-nar/cached' for /nar URLs with no compression. * tests/publish.scm ("with cache", "with cache, uncompressed"): Adjust expected result accordingly. --- tests/publish.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/publish.scm') diff --git a/tests/publish.scm b/tests/publish.scm index 31043f71fa..f33898fd58 100644 --- a/tests/publish.scm +++ b/tests/publish.scm @@ -340,7 +340,7 @@ FileSize: ~a~%" 200 ;nar/gzip/… #t ;Content-Length #t ;FileSize - 200) ;nar/… + 404) ;nar/… (call-with-temporary-directory (lambda (cache) (let ((thread (with-separate-output-ports @@ -393,7 +393,7 @@ FileSize: ~a~%" (let ((item (add-text-to-store %store "fake-compressed-thing.tar.gz" (random-text)))) (test-equal "with cache, uncompressed" - (list #f + (list #t `(("StorePath" . ,item) ("URL" . ,(string-append "nar/" (basename item))) ("Compression" . "none")) -- cgit v1.2.3