From 9d6c6cb20ef240221fc9a8e155f4bfa53e71bce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 16 Jan 2020 22:49:41 +0100 Subject: import: elpa: Rewrite test to use an HTTP server instead of mocking. * guix/import/elpa.scm (elpa-url): Add 'gnu/http'. (elpa->guix-package): Handle it. * tests/elpa.scm (elpa-package-info-mock, auctex-readme-mock) (elpa-version->string, package-source-url, ensure-list) (package-home-page, make-elpa-package): Remove. : Call '%http-server-port'. (eval-test-with-elpa): Remove uses of 'mock'. Use 'with-http-server' and parameterize 'current-http-proxy' instead. --- guix/import/elpa.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 83354d3f04..2d4487dba0 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Federico Beffa -;;; Copyright © 2015, 2016, 2017, 2018 Ludovic Courtès +;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ludovic Courtès ;;; Copyright © 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. @@ -72,6 +72,7 @@ NAMES (strings)." "Retrieve the URL of REPO." (let ((elpa-archives '((gnu . "https://elpa.gnu.org/packages") + (gnu/http . "http://elpa.gnu.org/packages") ;for testing (melpa-stable . "https://stable.melpa.org/packages") (melpa . "https://melpa.org/packages")))) (assq-ref elpa-archives repo))) @@ -251,7 +252,7 @@ type ''." (package ;; ELPA is known to contain only GPLv3+ code. Other repos may contain ;; code under other license but there's no license metadata. - (let ((license (and (eq? 'gnu repo) 'license:gpl3+))) + (let ((license (and (memq repo '(gnu gnu/http)) 'license:gpl3+))) (elpa-package->sexp package license))))) -- cgit v1.2.3