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