MCPcopy
hub / github.com/livekit/livekit / TestSingleNodeUpdateParticipant

Function TestSingleNodeUpdateParticipant

test/singlenode_test.go:578–600  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

576}
577
578func TestSingleNodeUpdateParticipant(t *testing.T) {
579 if testing.Short() {
580 t.SkipNow()
581 return
582 }
583 _, finish := setupSingleNodeTest("TestSingleNodeRoomList")
584 defer finish()
585
586 adminCtx := contextWithToken(adminRoomToken(testRoom))
587 t.Run("update nonexistent participant", func(t *testing.T) {
588 _, err := roomClient.UpdateParticipant(adminCtx, &livekit.UpdateParticipantRequest{
589 Room: testRoom,
590 Identity: "nonexistent",
591 Permission: &livekit.ParticipantPermission{
592 CanPublish: true,
593 },
594 })
595 require.Error(t, err)
596 var twErr twirp.Error
597 require.True(t, errors.As(err, &twErr))
598 require.Equal(t, twirp.NotFound, twErr.Code())
599 })
600}
601
602// Ensure that CORS headers are returned
603func TestSingleNodeCORS(t *testing.T) {

Callers

nothing calls this directly

Calls 5

setupSingleNodeTestFunction · 0.85
contextWithTokenFunction · 0.85
adminRoomTokenFunction · 0.85
RunMethod · 0.45
UpdateParticipantMethod · 0.45

Tested by

no test coverage detected