MCPcopy
hub / github.com/livekit/livekit / TestMultiNodeRemoveParticipant

Function TestMultiNodeRemoveParticipant

test/multinode_roomservice_test.go:90–120  ·  view source on GitHub ↗

remove a participant

(t *testing.T)

Source from the content-addressed store, hash-verified

88
89// remove a participant
90func TestMultiNodeRemoveParticipant(t *testing.T) {
91 if testing.Short() {
92 t.SkipNow()
93 return
94 }
95
96 for _, testRTCServicePath := range testRTCServicePaths {
97 t.Run(fmt.Sprintf("testRTCServicePath=%s", testRTCServicePath.String()), func(t *testing.T) {
98 _, _, finish := setupMultiNodeTest("TestMultiNodeRemoveParticipant")
99 defer finish()
100
101 c1 := createRTCClient("mn_remove_participant", defaultServerPort, testRTCServicePath, nil)
102 defer c1.Stop()
103 waitUntilConnected(t, c1)
104
105 ctx := contextWithToken(adminRoomToken(testRoom))
106 _, err := roomClient.RemoveParticipant(ctx, &livekit.RoomParticipantIdentity{
107 Room: testRoom,
108 Identity: "mn_remove_participant",
109 })
110 require.NoError(t, err)
111
112 // participant list doesn't show the participant
113 listRes, err := roomClient.ListParticipants(ctx, &livekit.ListParticipantsRequest{
114 Room: testRoom,
115 })
116 require.NoError(t, err)
117 require.Len(t, listRes.Participants, 0)
118 })
119 }
120}
121
122// update participant metadata
123func TestMultiNodeUpdateParticipantMetadata(t *testing.T) {

Callers

nothing calls this directly

Calls 11

setupMultiNodeTestFunction · 0.85
createRTCClientFunction · 0.85
waitUntilConnectedFunction · 0.85
contextWithTokenFunction · 0.85
adminRoomTokenFunction · 0.85
StopMethod · 0.65
RemoveParticipantMethod · 0.65
ListParticipantsMethod · 0.65
RunMethod · 0.45
StringMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected