[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/07: tests: Ensure 'cpan' updater test does not access the network.
From: |
guix-commits |
Subject: |
03/07: tests: Ensure 'cpan' updater test does not access the network. |
Date: |
Fri, 9 Jun 2023 08:52:49 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit f69d14d31af8325807d8529fccd3f0b6fd86e342
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jun 9 12:09:12 2023 +0200
tests: Ensure 'cpan' updater test does not access the network.
Previously it would try to access the real metacpan.org. This would
succeed when network is available because "Test-Script" is an existing
package.
* tests/cpan.scm ("package-latest-release"): Wrap
'upstream-source-inputs' call in 'parameterize'. Set
'current-http-proxy'. Change the order of responses in
'with-http-server'.
---
tests/cpan.scm | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/tests/cpan.scm b/tests/cpan.scm
index e4ee788e9d..42e8c4e42c 100644
--- a/tests/cpan.scm
+++ b/tests/cpan.scm
@@ -102,21 +102,22 @@
(downstream-name "perl-test-script")
(type 'propagated))))
(with-http-server `((200 ,test-json)
- (200 ,test-source)
- (200 "{ \"distribution\" : \"Test-Script\" }"))
- (define source
- (parameterize ((%metacpan-base-url (%local-url)))
+ (200 "{ \"distribution\" : \"Test-Script\" }")
+ (200 ,test-source))
+ (parameterize ((%metacpan-base-url (%local-url))
+ (current-http-proxy (%local-url)))
+ (define source
(package-latest-release
(dummy-package "perl-test-script"
- (version "0.0.0")
- (source (dummy-origin
- (method url-fetch)
- (uri "mirror://cpan/Foo-Bar-0.0.0.tgz"))))
- (list %cpan-updater))))
+ (version "0.0.0")
+ (source (dummy-origin
+ (method url-fetch)
+ (uri "mirror://cpan/Foo-Bar-0.0.0.tgz"))))
+ (list %cpan-updater)))
- (list (upstream-source-urls source)
- (upstream-source-signature-urls source)
- (upstream-source-inputs source))))
+ (list (upstream-source-urls source)
+ (upstream-source-signature-urls source)
+ (upstream-source-inputs source)))))
(test-equal "metacpan-url->mirror-url, http"
"mirror://cpan/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz"
- branch master updated (12fd3a9755 -> dd587a4fef), guix-commits, 2023/06/09
- 06/07: records: Remove "guix" from error message., guix-commits, 2023/06/09
- 05/07: system: account: Fix default value., guix-commits, 2023/06/09
- 02/07: import: stackage: Updater resolves inputs lazily., guix-commits, 2023/06/09
- 03/07: tests: Ensure 'cpan' updater test does not access the network.,
guix-commits <=
- 01/07: tests: Adjust minetest tests., guix-commits, 2023/06/09
- 04/07: tests: Ensure 'elpa' test does not access the network., guix-commits, 2023/06/09
- 07/07: gnu: lapack: Build CBLAS., guix-commits, 2023/06/09