ability to disable auto subscribe per participant

This commit is contained in:
David Zhao
2021-05-22 22:54:47 -07:00
parent 55d801d30b
commit 0900054c24
29 changed files with 236 additions and 7683 deletions
+3 -4
View File
@@ -4,10 +4,9 @@ import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/livekit/livekit-server/pkg/routing"
livekit "github.com/livekit/livekit-server/proto"
"github.com/stretchr/testify/require"
)
func TestIsAvailable(t *testing.T) {
@@ -17,7 +16,7 @@ func TestIsAvailable(t *testing.T) {
UpdatedAt: time.Now().Unix() - 3,
},
}
assert.True(t, routing.IsAvailable(n))
require.True(t, routing.IsAvailable(n))
})
t.Run("expired", func(t *testing.T) {
@@ -26,6 +25,6 @@ func TestIsAvailable(t *testing.T) {
UpdatedAt: time.Now().Unix() - 20,
},
}
assert.False(t, routing.IsAvailable(n))
require.False(t, routing.IsAvailable(n))
})
}