guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: tests: Adjust to gzip as the default log compression.


From: guix-commits
Subject: 01/04: tests: Adjust to gzip as the default log compression.
Date: Wed, 19 Jan 2022 16:15:19 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 435ffae2f29ecaa94f3aca835d79e222bc1263d5
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Jan 19 19:06:57 2022 +0100

    tests: Adjust to gzip as the default log compression.
    
    This is a followup to 575e52ac2b090fd194086e9c1c53bbf8055acbc2.
    
    * tests/publish.scm ("/log/NAME"): Expect a gzip-encoded log.
---
 tests/publish.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/publish.scm b/tests/publish.scm
index c3d086995a..e3c27c5eea 100644
--- a/tests/publish.scm
+++ b/tests/publish.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2020 by Amar M. Singh <nly@disroot.org>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès 
<ludo@gnu.org>
+;;; Copyright © 2016-2022 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -679,7 +679,7 @@ References: ~%"
                 (response-code (http-get nar)))))))))
 
 (test-equal "/log/NAME"
-  `(200 #t application/x-bzip2)
+  `(200 #t text/plain (gzip))
   (let ((drv (run-with-store %store
                (gexp->derivation "with-log"
                                  #~(call-with-output-file #$output
@@ -695,10 +695,11 @@ References: ~%"
            (base     (basename (derivation-file-name drv)))
            (log      (string-append (dirname %state-directory)
                                     "/log/guix/drvs/" (string-take base 2)
-                                    "/" (string-drop base 2) ".bz2")))
+                                    "/" (string-drop base 2) ".gz")))
       (list (response-code response)
             (= (response-content-length response) (stat:size (stat log)))
-            (first (response-content-type response))))))
+            (first (response-content-type response))
+            (response-content-encoding response)))))
 
 (test-equal "negative TTL"
   `(404 42)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]