MCPcopy
hub / github.com/livekit/livekit / TestCreateRoom

Function TestCreateRoom

pkg/service/roomallocator_test.go:32–48  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30)
31
32func TestCreateRoom(t *testing.T) {
33 t.Run("ensure default room settings are applied", func(t *testing.T) {
34 conf, err := config.NewConfig("", true, nil, nil)
35 require.NoError(t, err)
36
37 node, err := routing.NewLocalNode(conf)
38 require.NoError(t, err)
39
40 ra, conf := newTestRoomAllocator(t, conf, node.Clone())
41
42 room, _, _, err := ra.CreateRoom(context.Background(), &livekit.CreateRoomRequest{Name: "myroom"}, true)
43 require.NoError(t, err)
44 require.Equal(t, conf.Room.EmptyTimeout, room.EmptyTimeout)
45 require.Equal(t, conf.Room.DepartureTimeout, room.DepartureTimeout)
46 require.NotEmpty(t, room.EnabledCodecs)
47 })
48}
49
50func SelectRoomNode(t *testing.T) {
51 t.Run("reject new participants when track limit has been reached", func(t *testing.T) {

Callers

nothing calls this directly

Calls 6

CloneMethod · 0.95
NewConfigFunction · 0.92
NewLocalNodeFunction · 0.92
newTestRoomAllocatorFunction · 0.85
CreateRoomMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected