2023-08-01 20:54:51 +01:00
|
|
|
import Bots.BroadcastTests
|
|
|
|
import Bots.DirectoryTests
|
2021-08-05 20:51:48 +01:00
|
|
|
import ChatClient
|
2021-07-07 22:46:38 +01:00
|
|
|
import ChatTests
|
2023-08-01 20:54:51 +01:00
|
|
|
import ChatTests.Utils (xdescribe'')
|
2023-01-31 11:07:48 +00:00
|
|
|
import Control.Logger.Simple
|
|
|
|
import Data.Time.Clock.System
|
2021-05-09 10:53:18 +01:00
|
|
|
import MarkdownTests
|
2022-02-06 16:18:01 +00:00
|
|
|
import MobileTests
|
2021-07-04 18:42:24 +01:00
|
|
|
import ProtocolTests
|
2023-10-04 18:36:10 +03:00
|
|
|
import RemoteTests
|
2022-04-05 12:44:22 +04:00
|
|
|
import SchemaDump
|
2021-05-09 10:53:18 +01:00
|
|
|
import Test.Hspec
|
2023-01-31 11:07:48 +00:00
|
|
|
import UnliftIO.Temporary (withTempDirectory)
|
2023-06-08 11:23:04 +04:00
|
|
|
import ViewTests
|
2023-10-02 21:56:11 +01:00
|
|
|
import ValidNames
|
2023-02-19 23:51:50 +00:00
|
|
|
import WebRTCTests
|
2021-05-09 10:53:18 +01:00
|
|
|
|
|
|
|
main :: IO ()
|
2022-04-25 16:30:21 +01:00
|
|
|
main = do
|
2023-01-31 11:07:48 +00:00
|
|
|
setLogLevel LogError -- LogDebug
|
|
|
|
withGlobalLogging logCfg . hspec $ do
|
2023-08-16 10:41:52 +04:00
|
|
|
describe "Schema dump" schemaDumpTest
|
2022-04-25 16:30:21 +01:00
|
|
|
describe "SimpleX chat markdown" markdownTests
|
2023-06-08 11:23:04 +04:00
|
|
|
describe "SimpleX chat view" viewTests
|
2022-04-25 16:30:21 +01:00
|
|
|
describe "SimpleX chat protocol" protocolTests
|
2023-02-19 23:51:50 +00:00
|
|
|
describe "WebRTC encryption" webRTCTests
|
2023-10-02 21:56:11 +01:00
|
|
|
describe "Valid names" validNameTests
|
2023-01-31 11:07:48 +00:00
|
|
|
around testBracket $ do
|
|
|
|
describe "Mobile API Tests" mobileTests
|
|
|
|
describe "SimpleX chat client" chatTests
|
2023-08-01 20:54:51 +01:00
|
|
|
xdescribe'' "SimpleX Broadcast bot" broadcastBotTests
|
|
|
|
xdescribe'' "SimpleX Directory service bot" directoryServiceTests
|
2023-10-04 18:36:10 +03:00
|
|
|
describe "Remote session" remoteTests
|
2023-01-31 11:07:48 +00:00
|
|
|
where
|
|
|
|
testBracket test = do
|
|
|
|
t <- getSystemTime
|
|
|
|
let ts = show (systemSeconds t) <> show (systemNanoseconds t)
|
2023-03-21 15:21:14 +04:00
|
|
|
withSmpServer $ withTmpFiles $ withTempDirectory "tests/tmp" ts test
|
2022-04-25 16:30:21 +01:00
|
|
|
|
2023-01-31 11:07:48 +00:00
|
|
|
logCfg :: LogConfig
|
|
|
|
logCfg = LogConfig {lc_file = Nothing, lc_stderr = True}
|