mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-03-30 20:45:52 +00:00
* binary SMP protocol encoding (server tests fail) * use 1 byte for bytestring length when encoding/decoding * Encoding class, binary tags * update server tests * negotiate SMP version in client/server handshake * add version columns to queues and connections * split parsing SMP client commands and server responses to different functions * check uniqueness of protocol tags * split client commands and server responses/messages to separate types * update types in SMP client * remove pattern synonyms for SMP errors * simplify getHandshake * update SMP protocol encoding in protocol spec * encode time as a number of seconds (64-bit integer) since epoch
25 lines
897 B
Haskell
25 lines
897 B
Haskell
{-# LANGUAGE TypeApplications #-}
|
|
|
|
import AgentTests (agentTests)
|
|
import CoreTests.EncodingTests
|
|
import CoreTests.ProtocolErrorTests
|
|
import CoreTests.VersionRangeTests
|
|
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 1.3" $ serverTests (transport @TLS)
|
|
describe "SMP server via WebSockets" $ serverTests (transport @WS)
|
|
describe "SMP client agent" $ agentTests (transport @TLS)
|
|
removeDirectoryRecursive "tests/tmp"
|