mirror of
https://github.com/livekit/livekit.git
synced 2026-04-05 05:55:45 +00:00
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
28 lines
577 B
Go
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)
|
|
}
|
|
}
|