mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-22 03:40:17 +00:00
change tests
This commit is contained in:
@@ -8,7 +8,6 @@ import ChatTests.Files
|
||||
import ChatTests.Forward
|
||||
import ChatTests.Groups
|
||||
import ChatTests.Local
|
||||
import ChatTests.Names
|
||||
import ChatTests.Profiles
|
||||
import Test.Hspec hiding (it)
|
||||
|
||||
@@ -22,4 +21,3 @@ chatTests = do
|
||||
describe "file tests" chatFileTests
|
||||
describe "profile tests" chatProfileTests
|
||||
describe "chat list pagination tests" chatListTests
|
||||
describe "names tests" chatNamesTests
|
||||
|
||||
@@ -23,8 +23,8 @@ testConnectByName ps = withSmpServerAndNames $ \reg ->
|
||||
aliceName = SimplexNameInfo NTContact (SimplexNameDomain TLDSimplex "alice" [])
|
||||
test reg alice bob = do
|
||||
alice ##> "/ad"
|
||||
cLink <- getContactLink alice True
|
||||
registerName reg aliceName (contactNameRecord "alice" (T.pack cLink))
|
||||
(shortLink, _) <- getContactLinks alice True
|
||||
registerName reg aliceName (contactNameRecord "alice" (T.pack shortLink))
|
||||
bob ##> "/c @alice.simplex"
|
||||
alice <#? bob
|
||||
alice ##> "/ac bob"
|
||||
|
||||
@@ -8,6 +8,7 @@ import Bots.DirectoryTests
|
||||
import ChatClient
|
||||
import ChatTests
|
||||
import ChatTests.DBUtils
|
||||
import ChatTests.Names (chatNamesTests)
|
||||
import ChatTests.Utils (xdescribe'')
|
||||
import Control.Logger.Simple
|
||||
import Data.Time.Clock.System
|
||||
@@ -71,6 +72,9 @@ main = do
|
||||
describe "Message batching" batchingTests
|
||||
describe "Operators" operatorTests
|
||||
describe "Random servers" randomServersTests
|
||||
#if !defined(dbPostgres)
|
||||
around (tmpTestBracket chatQueryStats agentQueryStats) $ describe "names tests" chatNamesTests
|
||||
#endif
|
||||
#if defined(dbPostgres)
|
||||
createdDropDb . around testBracket
|
||||
#else
|
||||
@@ -96,6 +100,8 @@ main = do
|
||||
#else
|
||||
testBracket chatQueryStats agentQueryStats test =
|
||||
withSmpServer $ tmpBracket $ \tmpPath -> test TestParams {tmpPath, chatQueryStats, agentQueryStats, printOutput = False}
|
||||
tmpTestBracket chatQueryStats agentQueryStats test =
|
||||
tmpBracket $ \tmpPath -> test TestParams {tmpPath, chatQueryStats, agentQueryStats, printOutput = False}
|
||||
#endif
|
||||
tmpBracket test = do
|
||||
t <- getSystemTime
|
||||
|
||||
Reference in New Issue
Block a user