mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-04-27 04:15:13 +00:00
e63e0be2ac
- xftpTest/xftpTest2/xftpTest4/xftpTestN now take XFTPTestBracket as first argument, enabling the same test to run against both memory and PostgreSQL backends. - xftpFileTests (server tests), xftpAgentFileTests (agent tests), and xftpCLIFileTests (CLI tests) are SpecWith-parameterized suites that receive the bracket from HSpec's before combinator. - Test.hs runs each parameterized suite twice: once with xftpMemoryBracket, once with xftpPostgresBracket (CPP-guarded). - STM-specific tests (store log restore/replay) stay in memory-only xftpAgentTests. SNI/CORS tests stay in memory-only xftpServerTests.
Running tests with coverage
- Uncomment coverage sections in cabal.project file.
- Add
-fhpcto ghc-options of simplexmq-test in simplexmq.cabal file. - Disable (
xit) test "should subscribe to multiple (200) subscriptions with batching", enable (commentskip) the next test instead. - Run
cabal test. - Open generated coverage report in the browser.