Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions integration/test/API/GalleyInternal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ getFederationStatus user domains =
$ req
& addJSONObject ["domains" .= domainList]

-- | Poll until the user's backend is fully connected to all given domains
assertFullyConnected ::
( HasCallStack,
MakesValue user
) =>
user ->
[String] ->
App ()
assertFullyConnected user domains =
eventually
$ bindResponse (getFederationStatus user domains)
$ \resp -> do
resp.status `shouldMatchInt` 200
resp.json %. "status" `shouldMatch` "fully-connected"

-- | https://staging-nginz-https.zinfra.io/api-internal/swagger-ui/galley/#/galley/put_i_legalhold_whitelisted_teams__tid_
legalholdWhitelistTeam :: (HasCallStack, MakesValue uid, MakesValue tid) => tid -> uid -> App Response
legalholdWhitelistTeam tid uid = do
Expand Down
4 changes: 4 additions & 0 deletions integration/test/Test/Conversation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ testAddUnreachableUserFromFederatingBackend domain = do
otherDomain <- make domain & asString
[alice, bob, charlie, chad] <-
createAndConnectUsers [ownDomain, otherDomain, cDom.berDomain, cDom.berDomain]
-- Wait for ownDomain <-> {fed2, dynamicC} to be fully connected before
-- creating the conversation, so a transient fed2 reachability blip under
-- dynamic-backend churn does not turn the create into a 533 (WPB-3797).
assertFullyConnected alice [otherDomain, cDom.berDomain]

conv <- withWebSockets [bob, charlie] $ \wss -> do
conv <-
Expand Down