summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-06-09 12:30:45 +0200
committerLudovic Courtès <ludo@gnu.org>2023-06-09 14:19:14 +0200
commit53bf9fba0c9542a46702bb30251f5796da371e64 (patch)
tree117567768eeb9a2b24ecd4ada93bac4de65adced /guix
parentf69d14d31af8325807d8529fccd3f0b6fd86e342 (diff)
tests: Ensure 'elpa' test does not access the network.
Previously it would try to access the real elpa.gnu.org. This would succeed when network is available because "taxy-magit-section" is an existing package. * guix/import/elpa.scm (elpa-repository) (package-from-elpa-repository?): Recognize 'gnu/http. * tests/elpa.scm ("package-latest-release"): Use 'http' instead of 'https'. Change "taxy-magit-section" to "fake-taxy-magit-section".
Diffstat (limited to 'guix')
-rw-r--r--guix/import/elpa.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index e65cf6683b..d1855b3698 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -461,13 +461,15 @@ type '<elpa-package>'."
(and uri
(cond
((string=? (uri-host uri) "elpa.gnu.org")
- 'gnu)
+ (if (eq? (uri-scheme uri) 'http)
+ 'gnu/http ;for testing
+ 'gnu))
((string=? (uri-host uri) "elpa.nongnu.org")
'nongnu)
(else #f))))))))
(define (package-from-elpa-repository? package)
- (member (elpa-repository package) '(gnu nongnu)))
+ (member (elpa-repository package) '(gnu gnu/http nongnu)))
(define %elpa-updater
;; The ELPA updater. We restrict it to packages hosted on elpa.gnu.org