Files
livekit/pkg/service/utils_test.go
Raja Subramanian 391e2f8b31 Separate out max layer setting (#201)
Small step on the way to making StreamAllocator prioritization of tracks.
With the new callback into StreamAllocator, the idea is to use the
max layer information to do track prioritization.

Testing:
--------
Sanity check that sample app works
2021-11-22 14:01:25 +05:30

28 lines
577 B
Go

package service_test
import (
"github.com/go-redis/redis/v8"
"github.com/livekit/livekit-server/pkg/service"
"github.com/stretchr/testify/require"
"testing"
)
func redisClient() *redis.Client {
return redis.NewClient(&redis.Options{
Addr: "localhost:6379",
})
}
func TestIsValidDomain(t *testing.T) {
list := map[string]bool{
"turn.myhost.com": true,
"turn.google.com": true,
"https://host.com": false,
"turn://host.com": false,
}
for key, result := range list {
service.IsValidDomain(key)
require.Equal(t, service.IsValidDomain(key), result)
}
}