mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-03-30 14:16:00 +00:00
* agent schema/methods/types/store methods for notifications tokens * register notification token on the server * agent commands for notification tokens * refactor initial servers from AgentConfig * agent store functions for notification tokens * server STM store methods for tokens * fix protocol client for ntfs (use generic handshake), minimal server and agent tests * server command to verify ntf token
27 lines
1000 B
Haskell
27 lines
1000 B
Haskell
{-# LANGUAGE TypeApplications #-}
|
|
|
|
import AgentTests (agentTests)
|
|
import CoreTests.EncodingTests
|
|
import CoreTests.ProtocolErrorTests
|
|
import CoreTests.VersionRangeTests
|
|
import NtfServerTests (ntfServerTests)
|
|
import ServerTests
|
|
import Simplex.Messaging.Transport (TLS, Transport (..))
|
|
import Simplex.Messaging.Transport.WebSockets (WS)
|
|
import System.Directory (createDirectoryIfMissing, removeDirectoryRecursive)
|
|
import Test.Hspec
|
|
|
|
main :: IO ()
|
|
main = do
|
|
createDirectoryIfMissing False "tests/tmp"
|
|
hspec $ do
|
|
describe "Core tests" $ do
|
|
describe "Encoding tests" encodingTests
|
|
describe "Protocol error tests" protocolErrorTests
|
|
describe "Version range" versionRangeTests
|
|
describe "SMP server via TLS" $ serverTests (transport @TLS)
|
|
describe "SMP server via WebSockets" $ serverTests (transport @WS)
|
|
describe "Ntf server via TLS" $ ntfServerTests (transport @TLS)
|
|
describe "SMP client agent" $ agentTests (transport @TLS)
|
|
removeDirectoryRecursive "tests/tmp"
|