Files
simplex-chat/tests/Test.hs
T

44 lines
1.4 KiB
Haskell
Raw Normal View History

2023-08-01 20:54:51 +01:00
import Bots.BroadcastTests
import Bots.DirectoryTests
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
import JSONTests
2021-05-09 10:53:18 +01:00
import MarkdownTests
import MobileTests
import ProtocolTests
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)
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-10-22 11:42:19 +03:00
setLogLevel LogError
2023-01-31 11:07:48 +00:00
withGlobalLogging logCfg . hspec $ do
describe "Schema dump" schemaDumpTest
2022-04-25 16:30:21 +01:00
describe "SimpleX chat markdown" markdownTests
describe "JSON Tests" jsonTests
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-14 13:10:06 +01: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)
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}