diff --git a/tests/ChatClient.hs b/tests/ChatClient.hs index d4a419623..688ccabf7 100644 --- a/tests/ChatClient.hs +++ b/tests/ChatClient.hs @@ -30,7 +30,7 @@ import Simplex.Messaging.Agent.RetryInterval import Simplex.Messaging.Server (runSMPServerBlocking) import Simplex.Messaging.Server.Env.STM import Simplex.Messaging.Transport -import System.Directory (createDirectoryIfMissing, removeDirectoryRecursive) +import System.Directory (createDirectoryIfMissing, removePathForcibly) import qualified System.Terminal as C import System.Terminal.Internal (VirtualTerminal (..), VirtualTerminalSettings (..), withVirtualTerminal) import System.Timeout (timeout) @@ -144,7 +144,7 @@ withTmpFiles :: IO () -> IO () withTmpFiles = bracket_ (createDirectoryIfMissing False "tests/tmp") - (removeDirectoryRecursive "tests/tmp") + (removePathForcibly "tests/tmp") testChatN :: [Profile] -> ([TestCC] -> IO ()) -> IO () testChatN ps test = withTmpFiles $ do diff --git a/tests/MobileTests.hs b/tests/MobileTests.hs index 9e73060f9..0ca78fa79 100644 --- a/tests/MobileTests.hs +++ b/tests/MobileTests.hs @@ -53,10 +53,10 @@ testChatApiNoUser = withTmpFiles $ do testChatApi :: IO () testChatApi = withTmpFiles $ do - let f = chatStoreFile $ testDBPrefix <> "1" + let f = chatStoreFile testDBPrefix st <- createStore f 1 True Right _ <- runExceptT $ createUser st aliceProfile True - cc <- chatInit $ testDBPrefix <> "1" + cc <- chatInit testDBPrefix chatSendCmd cc "/u" `shouldReturn` activeUser chatSendCmd cc "/u alice Alice" `shouldReturn` activeUserExists chatSendCmd cc "/_start" `shouldReturn` chatStarted