From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:35717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWpFS-0004Jp-Ve for guix-patches@gnu.org; Fri, 31 May 2019 17:39:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWp0M-0007aO-N0 for guix-patches@gnu.org; Fri, 31 May 2019 17:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51161) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWp0M-0007aC-Jh for guix-patches@gnu.org; Fri, 31 May 2019 17:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hWp0M-0008I7-FE for guix-patches@gnu.org; Fri, 31 May 2019 17:24:02 -0400 Subject: [bug#35929] [PATCH 2/3] tests: hackage: Don't mock hackage-fetch. Resent-Message-ID: From: Robert Vollmert Date: Fri, 31 May 2019 23:22:42 +0200 Message-Id: <20190531212243.58302-2-rob@vllmrt.net> In-Reply-To: <20190531212243.58302-1-rob@vllmrt.net> References: <20190531212243.58302-1-rob@vllmrt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 35929@debbugs.gnu.org Cc: Robert Vollmert * tests/hackage.scm: Pass a string input port to tests instead of mocking hackage download. --- tests/hackage.scm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/hackage.scm b/tests/hackage.scm index 41e3b2dcd3..1b4800164e 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -186,12 +186,8 @@ library ('license 'bsd-3))) (define* (eval-test-with-cabal test-cabal matcher #:key (cabal-environment '())) - (mock - ((guix import hackage) hackage-fetch - (lambda (name-version) - (call-with-input-string test-cabal - read-cabal))) - (matcher (hackage->guix-package "foo" #:cabal-environment cabal-environment)))) + (define port (open-input-string test-cabal)) + (matcher (hackage->guix-package "foo" #:port port #:cabal-environment cabal-environment))) (test-assert "hackage->guix-package test 1" (eval-test-with-cabal test-cabal-1 match-ghc-foo)) -- 2.20.1 (Apple Git-117)