summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Vollmert <rob@vllmrt.net>2019-05-31 23:22:42 +0200
committerLudovic Courtès <ludo@gnu.org>2019-06-01 15:26:30 +0200
commit4110cde00560bd97cc8d83c34b80c52f37c680a2 (patch)
treeaaaa3d90bef0829f4eb35f1afa0c8e2a8aac3768
parent55c98f3261b6ced2c38e060566e1eb952bd3e42b (diff)
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>
-rw-r--r--tests/hackage.scm8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/hackage.scm b/tests/hackage.scm
index 41e3b2dcd38..1b4800164e0 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -186,12 +186,8 @@ library
186 ('license 'bsd-3))) 186 ('license 'bsd-3)))
187 187
188(define* (eval-test-with-cabal test-cabal matcher #:key (cabal-environment '())) 188(define* (eval-test-with-cabal test-cabal matcher #:key (cabal-environment '()))
189 (mock 189 (define port (open-input-string test-cabal))
190 ((guix import hackage) hackage-fetch 190 (matcher (hackage->guix-package "foo" #:port port #:cabal-environment cabal-environment)))
191 (lambda (name-version)
192 (call-with-input-string test-cabal
193 read-cabal)))
194 (matcher (hackage->guix-package "foo" #:cabal-environment cabal-environment))))
195 191
196(test-assert "hackage->guix-package test 1" 192(test-assert "hackage->guix-package test 1"
197 (eval-test-with-cabal test-cabal-1 match-ghc-foo)) 193 (eval-test-with-cabal test-cabal-1 match-ghc-foo))