hackage-server
hackage-server copied to clipboard
one test fails in Nix flake
Tests configured here; tests for hackage-server currently disabled:
https://github.com/haskell/hackage-server/blob/613f5eb2f24d6ccbdef349d65f38247425ab64df/flake.nix#L22-L26
If
hackage-server.check = true;
nix build will run all the tests for hackage-server.
The result is:
$ nix build
warning: Git tree '/home/peterbecich/haskell/libraries/hackage-server' is dirty
error: builder for '/nix/store/wn52nq1y63s73rm648bks4g6d8ayl2k9-hackage-server-0.5.1.drv' failed with exit code 1;
last 10 log lines:
> = Getting testpackage maintainer info
> = Finished with server
> Got thread killed, so killing
> = Server terminated
> Test suite HighLevelTest: PASS
> Test suite logged to: dist/test/hackage-server-0.5.1-HighLevelTest.log
> Test suite PaginationTest: RUNNING...
> Test suite PaginationTest: PASS
> Test suite logged to: dist/test/hackage-server-0.5.1-PaginationTest.log
> 6 of 7 test suites (6 of 7 test cases) passed.
For full logs, run 'nix log /nix/store/wn52nq1y63s73rm648bks4g6d8ayl2k9-hackage-server-0.5.1.drv'.
Excerpt from the full logs:
= Server thread started
= Server not up yet; will try again shortly
= (result was Left user error (openTCPConnection: failed to connect to 127.0.0.1:8392: Network.Socket.connect: <socket: 13>: does not exist (Connection refused)))
using "/build/hackage-server-0.5.1/dist/build/hackage-server/hackage-server"
hackage-server: Guessing public URI as http://localhost:8392
(you can override with the --base-uri= flag)
hackage-server: Ready! Point your browser at http://localhost:8392
= Making a request to see if server is up
= Server is up
= Server running
= Getting package list
= Getting package index
= Getting package index with etag
= Getting testpackage info
= Validating "/package/testpackage.html": failed: 1 error(s)
1. Couldn't connect to validation service
= Getting testpackage-1.0.0.0 info
= Validating "/package/testpackage-1.0.0.0": failed: 1 error(s)
1. Couldn't connect to validation service
= Getting testpackage-1.0.0.0 info (JSON)
= Validating "/package/testpackage-1.0.0.0.json": failed: 1 error(s)
1. Couldn't connect to validation service
= Getting testpackage version info (JSON)
= Validating "/package/testpackage.json": failed: 1 error(s)
1. Couldn't connect to validation service
= Getting testpackage Cabal file
= Getting testpackage tar file
= Getting testpackage source
= Getting testpackage source with etag
= Getting testpackage maintainer info
= Finished with server
Got thread killed, so killing
= Server terminated
Test suite HighLevelTest: PASS
Test suite logged to: dist/test/hackage-server-0.5.1-HighLevelTest.log
Test suite PaginationTest: RUNNING...
Test suite PaginationTest: PASS
Test suite logged to: dist/test/hackage-server-0.5.1-PaginationTest.log
6 of 7 test suites (6 of 7 test cases) passed.