mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-03-30 20:45:52 +00:00
* xftp: agent receive file draft * receiveFile more stubs, changes to types, schema * cabal file * comments * xftp_server_id * schema changes, get client, local worker/action * agent env, save file description, adjust schema * client stubs * download chunk wip, store, schema, types * remove commented code * read file description, schema, types * check received, decrypt * remove pure * todo * add XFTP to agent client * add user id * agent test * tests * rename supervisor into agent --------- Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
52 lines
1.9 KiB
Haskell
52 lines
1.9 KiB
Haskell
{-# LANGUAGE TypeApplications #-}
|
|
|
|
import AgentTests (agentTests)
|
|
import CLITests
|
|
import Control.Logger.Simple
|
|
import CoreTests.CryptoTests
|
|
import CoreTests.EncodingTests
|
|
import CoreTests.ProtocolErrorTests
|
|
import CoreTests.RetryIntervalTests
|
|
import CoreTests.VersionRangeTests
|
|
import FileDescriptionTests (fileDescriptionTests)
|
|
import NtfServerTests (ntfServerTests)
|
|
import ServerTests
|
|
import Simplex.Messaging.Transport (TLS, Transport (..))
|
|
import Simplex.Messaging.Transport.WebSockets (WS)
|
|
import System.Directory (createDirectoryIfMissing, removeDirectoryRecursive)
|
|
import System.Environment (setEnv)
|
|
import Test.Hspec
|
|
import XFTPAgent
|
|
import XFTPCLI
|
|
import XFTPServerTests (xftpServerTests)
|
|
|
|
logCfg :: LogConfig
|
|
logCfg = LogConfig {lc_file = Nothing, lc_stderr = True}
|
|
|
|
main :: IO ()
|
|
main = do
|
|
setLogLevel LogError -- LogInfo
|
|
withGlobalLogging logCfg $ do
|
|
setEnv "APNS_KEY_ID" "H82WD9K9AQ"
|
|
setEnv "APNS_KEY_FILE" "./tests/fixtures/AuthKey_H82WD9K9AQ.p8"
|
|
hspec
|
|
. before_ (createDirectoryIfMissing False "tests/tmp")
|
|
. after_ (removeDirectoryRecursive "tests/tmp")
|
|
$ do
|
|
describe "Core tests" $ do
|
|
describe "Encoding tests" encodingTests
|
|
describe "Protocol error tests" protocolErrorTests
|
|
describe "Version range" versionRangeTests
|
|
describe "Encryption tests" cryptoTests
|
|
describe "Retry interval tests" retryIntervalTests
|
|
describe "SMP server via TLS" $ serverTests (transport @TLS)
|
|
describe "SMP server via WebSockets" $ serverTests (transport @WS)
|
|
describe "Notifications server" $ ntfServerTests (transport @TLS)
|
|
describe "SMP client agent" $ agentTests (transport @TLS)
|
|
describe "XFTP" $ do
|
|
describe "XFTP server" xftpServerTests
|
|
describe "XFTP file description" fileDescriptionTests
|
|
describe "XFTP CLI" xftpCLITests
|
|
describe "XFTP agent" xftpAgentTests
|
|
describe "Server CLIs" cliTests
|