Skip to content
Merged
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
9 changes: 0 additions & 9 deletions libs/tasty-cannon/src/Test/Tasty/Cannon.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ module Test.Tasty.Cannon
MatchFailure (..),
await,
awaitMatch,
awaitMatch_,
awaitMatchN,
assertMatch,
assertMatch_,
Expand Down Expand Up @@ -311,14 +310,6 @@ awaitMatch t ws match = go [] []
pure (Left (MatchTimeout errs))
refill = mapM_ (liftIO . atomically . writeTChan (wsChan ws))

awaitMatch_ ::
(HasCallStack, MonadIO m, MonadCatch m) =>
Timeout ->
WebSocket ->
(Notification -> Assertion) ->
m ()
awaitMatch_ t w = void . awaitMatch t w

assertMatch ::
(HasCallStack, MonadIO m, MonadCatch m) =>
Timeout ->
Expand Down
6 changes: 2 additions & 4 deletions services/galley/test/integration/API/Teams.hs
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,12 @@ testAddTeamConvLegacy = do
testAddTeamConvWithRole :: TestM ()
testAddTeamConvWithRole = do
c <- view tsCannon
(tid, owner, mem2 : _) <- Util.createBindingTeamWithMembers 2
(owner, tid) <- Util.createBindingTeam
qOwner <- Qualified owner <$> viewFederationDomain
extern <- Util.randomUser
qExtern <- Qualified extern <$> viewFederationDomain
Util.connectUsers owner (list1 extern [])
Util.connectUsers mem2 (list1 extern [])
WS.bracketRN c [owner, extern, mem2] $ \[wsOwner, wsExtern, wsMem2] -> do
WS.bracketRN c [owner, extern] $ \[wsOwner, wsExtern] -> do
-- Regular conversation:
cid2 <- Util.createTeamConvWithRole owner tid [extern] (Just "blaa") Nothing Nothing roleNameWireAdmin
checkConvCreateEvent cid2 wsOwner
Expand All @@ -770,7 +769,6 @@ testAddTeamConvWithRole = do

mem1 <- Util.addUserToTeam owner tid
checkTeamMemberJoin tid (mem1 ^. userId) wsOwner
checkTeamMemberJoin tid (mem1 ^. userId) wsMem2
-- ... but not to regular ones.
Util.assertNotConvMember (mem1 ^. userId) cid2

Expand Down
2 changes: 1 addition & 1 deletion services/galley/test/integration/API/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2761,7 +2761,7 @@ checkUserDeleteEvent uid timeout_ w = WS.assertMatch_ timeout_ w $ \notif -> do
euser @?= Just (UUID.toText (toUUID uid))

checkTeamMemberJoin :: HasCallStack => TeamId -> UserId -> WS.WebSocket -> TestM ()
checkTeamMemberJoin tid uid w = WS.awaitMatch_ checkTimeout w $ \notif -> do
checkTeamMemberJoin tid uid w = WS.assertMatch_ checkTimeout w $ \notif -> do
ntfTransient notif @?= True
let e = List1.head (WS.unpackPayload notif)
e ^. eventTeam @?= tid
Expand Down