diff --git a/services/galley/test/integration/API/Federation.hs b/services/galley/test/integration/API/Federation.hs index b9d5f66e2ba..b59eab161ba 100644 --- a/services/galley/test/integration/API/Federation.hs +++ b/services/galley/test/integration/API/Federation.hs @@ -838,10 +838,7 @@ sendMessage = do connectWithRemoteUser aliceId bob connectWithRemoteUser aliceId chad -- conversation - let responses1 = do - comp <- frComponent <$> getRequest - guard (comp == Brig) - mockReply [bobProfile, chadProfile] + let responses1 = guardComponent Brig *> mockReply [bobProfile, chadProfile] (convId, requests1) <- withTempMockFederator' (responses1 <|> mockReply ()) $ fmap decodeConvId $ diff --git a/services/galley/test/integration/API/Util.hs b/services/galley/test/integration/API/Util.hs index e320c92f32e..12a928e19de 100644 --- a/services/galley/test/integration/API/Util.hs +++ b/services/galley/test/integration/API/Util.hs @@ -2746,8 +2746,7 @@ checkTimeout = 3 # Second -- responses by Brig on the mocked side of federation. mockedFederatedBrigResponse :: [(Qualified UserId, Text)] -> Mock LByteString mockedFederatedBrigResponse users = do - comp <- frComponent <$> getRequest - guard (comp == Brig) + guardComponent Brig mockReply [mkProfile mem (Name name) | (mem, name) <- users] fedRequestsForDomain :: HasCallStack => Domain -> Component -> [FederatedRequest] -> [FederatedRequest]