Support new SIP Trunk API. Improve Redis tests. (#2799)
This commit is contained in:
@@ -31,9 +31,13 @@ import (
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
)
|
||||
|
||||
func redisStore(t testing.TB) *service.RedisStore {
|
||||
return service.NewRedisStore(redisClient(t))
|
||||
}
|
||||
|
||||
func TestRoomInternal(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
rs := service.NewRedisStore(redisClient())
|
||||
rs := redisStore(t)
|
||||
|
||||
room := &livekit.Room{
|
||||
Sid: "123",
|
||||
@@ -61,7 +65,7 @@ func TestRoomInternal(t *testing.T) {
|
||||
|
||||
func TestParticipantPersistence(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
rs := service.NewRedisStore(redisClient())
|
||||
rs := redisStore(t)
|
||||
|
||||
roomName := livekit.RoomName("room1")
|
||||
_ = rs.DeleteRoom(ctx, roomName)
|
||||
@@ -108,7 +112,7 @@ func TestParticipantPersistence(t *testing.T) {
|
||||
|
||||
func TestRoomLock(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
rs := service.NewRedisStore(redisClient())
|
||||
rs := redisStore(t)
|
||||
lockInterval := 5 * time.Millisecond
|
||||
roomName := livekit.RoomName("myroom")
|
||||
|
||||
@@ -158,8 +162,7 @@ func TestRoomLock(t *testing.T) {
|
||||
|
||||
func TestEgressStore(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
rc := redisClient()
|
||||
rs := service.NewRedisStore(rc)
|
||||
rs := redisStore(t)
|
||||
|
||||
roomName := "egress-test"
|
||||
|
||||
@@ -229,7 +232,7 @@ func TestEgressStore(t *testing.T) {
|
||||
|
||||
func TestIngressStore(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
rs := service.NewRedisStore(redisClient())
|
||||
rs := redisStore(t)
|
||||
|
||||
info := &livekit.IngressInfo{
|
||||
IngressId: "ingressId",
|
||||
|
||||
Reference in New Issue
Block a user