mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-06-06 04:01:28 +00:00
5de4f78e50
- Move STMFileStore and its FileStoreClass instance from Store/STM.hs back into Store.hs — the separate file was unnecessary indirection for the always-present default implementation. - Parameterize xftpFileTests over store backend using HSpec SpecWith pattern (following SMP's serverTests approach). The same 11 tests now run against both memory and PostgreSQL backends via a bracket parameter, eliminating all *Pg test duplicates. - Extract shared run* functions (runTestFileChunkDeliveryAddRecipients, runTestWrongChunkSize, runTestFileChunkExpiration, runTestFileStorageQuota) from inlined test bodies.
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.