Support new SIP Trunk API. Improve Redis tests. (#2799)

This commit is contained in:
Denys Smirnov
2024-06-17 21:49:51 +03:00
committed by GitHub
parent ef838e4fa2
commit 74c7b93170
12 changed files with 1288 additions and 103 deletions
+9 -6
View File
@@ -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",