tests for MediaTrack, moving interfaces to new package

This commit is contained in:
David Zhao
2020-12-31 23:24:45 -08:00
parent 313236e3d3
commit 0336e9d92f
23 changed files with 1210 additions and 191 deletions
+5 -5
View File
@@ -1,13 +1,13 @@
package rtc_test
import (
"github.com/livekit/livekit-server/pkg/rtc/rtcfakes"
"github.com/livekit/livekit-server/pkg/rtc/types/typesfakes"
"github.com/livekit/livekit-server/pkg/utils"
"github.com/livekit/livekit-server/proto/livekit"
)
func newMockParticipant(name string) *rtcfakes.FakeParticipant {
p := &rtcfakes.FakeParticipant{}
func newMockParticipant(name string) *typesfakes.FakeParticipant {
p := &typesfakes.FakeParticipant{}
p.IDReturns(utils.NewGuid(utils.ParticipantPrefix))
p.NameReturns(name)
p.StateReturns(livekit.ParticipantInfo_JOINED)
@@ -15,8 +15,8 @@ func newMockParticipant(name string) *rtcfakes.FakeParticipant {
return p
}
func newMockTrack(kind livekit.TrackInfo_Type, name string) *rtcfakes.FakePublishedTrack {
t := &rtcfakes.FakePublishedTrack{}
func newMockTrack(kind livekit.TrackInfo_Type, name string) *typesfakes.FakePublishedTrack {
t := &typesfakes.FakePublishedTrack{}
t.IDReturns(utils.NewGuid(utils.TrackPrefix))
t.KindReturns(kind)
t.StreamIDReturns(name)