[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: tests: ‘rewrite-url’ test no longer depends on network access.
From: |
guix-commits |
Subject: |
01/07: tests: ‘rewrite-url’ test no longer depends on network access. |
Date: |
Wed, 27 Sep 2023 18:07:21 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 72fc91b113564f8006094c0118f06af0f414d21b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Sep 27 23:34:15 2023 +0200
tests: ‘rewrite-url’ test no longer depends on network access.
Fixes <https://issues.guix.gnu.org/66097>.
Previously, this test would actually need to access dist.libuv.org.
* tests/gnu-maintenance.scm ("rewrite-url, without to-version"): Change
URLs from https to http, and from libuv.org to libuv.example.org.
Parameterize ‘current-http-proxy’.
Reported-by: Janneke Nieuwenhuizen <janneke@gnu.org>
---
tests/gnu-maintenance.scm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/gnu-maintenance.scm b/tests/gnu-maintenance.scm
index 61ae295b96..6fde1eb8b1 100644
--- a/tests/gnu-maintenance.scm
+++ b/tests/gnu-maintenance.scm
@@ -25,6 +25,7 @@
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-64)
+ #:use-module ((web client) #:select (current-http-proxy))
#:use-module (ice-9 match))
(test-begin "gnu-maintenance")
@@ -157,9 +158,9 @@ submodules/qtbase-everywhere-src-6.5.2.tar.xz"
submodules/qtbase-everywhere-src-6.3.2.tar.xz" "6.3.2" #:to-version "6.5.2"))
(test-equal "rewrite-url, without to-version"
- "https://dist.libuv.org/dist/v1.46.0/libuv-v1.46.0.tar.gz"
+ "http://dist.libuv.example.org/dist/v1.46.0/libuv-v1.46.0.tar.gz"
(with-http-server
- ;; First reply, crawling https://dist.libuv.org/dist/.
+ ;; First reply, crawling http://dist.libuv.example.org/dist/.
`((200 "\
<!DOCTYPE html>
<html>
@@ -173,7 +174,7 @@ submodules/qtbase-everywhere-src-6.3.2.tar.xz" "6.3.2"
#:to-version "6.5.2"))
<a href=\"v1.46.0/\" title=\"v1.46.0/\">v1.46.0/</a>
</body>
</html>")
- ;; Second reply, crawling https://dist.libuv.org/dist/v1.46.0/.
+ ;; Second reply, crawling http://dist.libuv.example.org/dist/v1.46.0/.
(200 "\
<!DOCTYPE html>
<html>
@@ -190,7 +191,8 @@ submodules/qtbase-everywhere-src-6.3.2.tar.xz" "6.3.2"
#:to-version "6.5.2"))
libuv-v1.46.0.tar.gz.sign</a>
</body>
</html>"))
- (rewrite-url "https://dist.libuv.org/dist/v1.45.0/libuv-v1.45.0.tar.gz"
- "1.45.0")))
+ (parameterize ((current-http-proxy (%local-url)))
+ (rewrite-url
"http://dist.libuv.example.org/dist/v1.45.0/libuv-v1.45.0.tar.gz"
+ "1.45.0"))))
(test-end)
- branch master updated (bab1d1704d -> d0438fcf65), guix-commits, 2023/09/27
- 02/07: gnu: Add blinkenlights., guix-commits, 2023/09/27
- 05/07: gnu: python-pyusb: Use G-Expressions., guix-commits, 2023/09/27
- 01/07: tests: ‘rewrite-url’ test no longer depends on network access.,
guix-commits <=
- 03/07: gnu: Add qdl., guix-commits, 2023/09/27
- 06/07: gnu: python-pyusb: Add libusb-compat backend., guix-commits, 2023/09/27
- 07/07: gnu: Add liquidctl., guix-commits, 2023/09/27
- 04/07: gnu: Add python-smbus., guix-commits, 2023/09/27