From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:44961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWnKp-0008BV-PP for guix-patches@gnu.org; Fri, 31 May 2019 15:37:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWnKo-0000YI-RX for guix-patches@gnu.org; Fri, 31 May 2019 15:37:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50976) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWnKo-0000YA-OI for guix-patches@gnu.org; Fri, 31 May 2019 15:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hWnKo-00018t-JZ for guix-patches@gnu.org; Fri, 31 May 2019 15:37:02 -0400 Subject: [bug#35929] [PATCH 2/2] tests: hackage: Don't mock hackage-fetch. Resent-Message-ID: From: Robert Vollmert Date: Fri, 31 May 2019 21:36:29 +0200 Message-Id: <20190531193629.57733-2-rob@vllmrt.net> In-Reply-To: <20190531193629.57733-1-rob@vllmrt.net> References: <20190531193629.57733-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 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/hackage.scm b/tests/hackage.scm index c73a28c1f5..ee9cd6bc2d 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -158,14 +158,10 @@ library (define-syntax-rule (make-cabal-import-test pattern) (lambda* (test-cabal #:key (cabal-environment '())) - (mock - ((guix import hackage) hackage-fetch - (lambda (name-version) - (call-with-input-string test-cabal - read-cabal))) - (match (hackage->guix-package "foo" #:cabal-environment cabal-environment) - (pattern #t) - (x (pk 'fail x #f)))))) + (define port (open-input-string test-cabal)) + (match (hackage->guix-package "foo" #:port port #:cabal-environment cabal-environment) + (pattern #t) + (x (pk 'fail x #f))))) (define test-cabal-ghc-foo (make-cabal-import-test -- 2.20.1 (Apple Git-117)