mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 20:29:53 +00:00
* core: use port 7001 for test server * enable only failing tests * start/stop server for every test * log message that failed to parse * stop chat synchronously * print call stack * add HasCallStack * increase test timeout * add call stacks * more call stacks * fix test * disable failing test * add delay between the tests * make delay more visible * remove change in error message * reduce test delay, increase timeout * increase delay between the tests * run each test with a database in a different folder * folder name * refactor * update nix file, more stacks
29 lines
889 B
Haskell
29 lines
889 B
Haskell
import ChatClient
|
|
import ChatTests
|
|
import Control.Logger.Simple
|
|
import Data.Time.Clock.System
|
|
import MarkdownTests
|
|
import MobileTests
|
|
import ProtocolTests
|
|
import SchemaDump
|
|
import Test.Hspec
|
|
import UnliftIO.Temporary (withTempDirectory)
|
|
|
|
main :: IO ()
|
|
main = do
|
|
setLogLevel LogError -- LogDebug
|
|
withGlobalLogging logCfg . hspec $ do
|
|
describe "SimpleX chat markdown" markdownTests
|
|
describe "SimpleX chat protocol" protocolTests
|
|
describe "Schema dump" schemaDumpTest
|
|
around testBracket $ do
|
|
describe "Mobile API Tests" mobileTests
|
|
describe "SimpleX chat client" chatTests
|
|
where
|
|
testBracket test = do
|
|
t <- getSystemTime
|
|
let ts = show (systemSeconds t) <> show (systemNanoseconds t)
|
|
withSmpServer $ withTmpFiles $ withTempDirectory "tests" ("tmp" <> ts) test
|
|
|
|
logCfg :: LogConfig
|
|
logCfg = LogConfig {lc_file = Nothing, lc_stderr = True}
|