mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
core: fix remote handshake test (#3209)
* Fix remoteHandshakeTest Sidesteps some yet to be uncovered bug when mobile stops its side before the desktop. * remove ambiguous update warning --------- Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
392447ea33
commit
193361c09a
+19
-8
@@ -36,7 +36,7 @@ remoteTests :: SpecWith FilePath
|
||||
remoteTests = describe "Handshake" $ do
|
||||
it "generates usable credentials" genCredentialsTest
|
||||
it "connects announcer with discoverer over reverse-http2" announceDiscoverHttp2Test
|
||||
xit "connects desktop and mobile" remoteHandshakeTest
|
||||
it "connects desktop and mobile" remoteHandshakeTest
|
||||
it "send messages via remote desktop" remoteCommandTest
|
||||
|
||||
-- * Low-level TLS with ephemeral credentials
|
||||
@@ -129,6 +129,24 @@ remoteHandshakeTest = testChat2 aliceProfile bobProfile $ \desktop mobile -> do
|
||||
mobile <## "remote controller 1 accepted" -- alternative scenario: accepted before controller start
|
||||
mobile <## "remote controller 1 connecting to TODO"
|
||||
mobile <## "remote controller 1 connected, TODO"
|
||||
|
||||
traceM " - Session active"
|
||||
desktop ##> "/list remote hosts"
|
||||
desktop <## "Remote hosts:"
|
||||
desktop <## "1. TODO (active)"
|
||||
mobile ##> "/list remote ctrls"
|
||||
mobile <## "Remote controllers:"
|
||||
mobile <## "1. TODO (active)"
|
||||
|
||||
traceM " - Shutting desktop"
|
||||
desktop ##> "/stop remote host 1"
|
||||
desktop <## "remote host 1 stopped"
|
||||
desktop ##> "/delete remote host 1"
|
||||
desktop <## "remote host 1 deleted"
|
||||
desktop ##> "/list remote hosts"
|
||||
desktop <## "No remote hosts"
|
||||
|
||||
traceM " - Shutting mobile"
|
||||
mobile ##> "/stop remote ctrl"
|
||||
mobile <## "ok"
|
||||
mobile <## "remote controller stopped"
|
||||
@@ -137,13 +155,6 @@ remoteHandshakeTest = testChat2 aliceProfile bobProfile $ \desktop mobile -> do
|
||||
mobile ##> "/list remote ctrls"
|
||||
mobile <## "No remote controllers"
|
||||
|
||||
desktop ##> "/stop remote host 1"
|
||||
desktop <## "remote host 1 stopped"
|
||||
desktop ##> "/delete remote host 1"
|
||||
desktop <## "remote host 1 deleted"
|
||||
desktop ##> "/list remote hosts"
|
||||
desktop <## "No remote hosts"
|
||||
|
||||
remoteCommandTest :: (HasCallStack) => FilePath -> IO ()
|
||||
remoteCommandTest = testChat3 aliceProfile aliceDesktopProfile bobProfile $ \mobile desktop bob -> do
|
||||
let mobileFiles = "./tests/tmp/mobile_files"
|
||||
|
||||
Reference in New Issue
Block a user