tests: hackage: Don't mock hackage-fetch.

* tests/hackage.scm: Pass a string input port to tests instead of
mocking hackage download.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Robert Vollmert 2019-05-31 23:22:42 +02:00 committed by Ludovic Courtès
parent 55c98f3261
commit 4110cde005
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 2 additions and 6 deletions

View File

@ -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))