Code inspection (#581)

* Code inspection

* fix [4]int64 conversiong
This commit is contained in:
David Colburn
2022-03-30 13:49:53 -07:00
committed by GitHub
parent 26f7bb498a
commit 0b8a180554
77 changed files with 228 additions and 151 deletions
@@ -4,8 +4,9 @@ import (
"context"
"testing"
"github.com/livekit/protocol/livekit"
"github.com/stretchr/testify/require"
"github.com/livekit/protocol/livekit"
)
func Test_OnParticipantJoin_EventIsSent(t *testing.T) {
+4 -3
View File
@@ -4,9 +4,10 @@ import (
"context"
"testing"
"github.com/livekit/protocol/livekit"
"github.com/stretchr/testify/require"
"github.com/livekit/protocol/livekit"
"github.com/livekit/livekit-server/pkg/telemetry"
"github.com/livekit/livekit-server/pkg/telemetry/telemetryfakes"
)
@@ -447,7 +448,7 @@ func Test_AnalyticsSentWhenParticipantLeaves(t *testing.T) {
// do
fixture.sut.ParticipantLeft(context.Background(), room, participantInfo)
// should not be called if there are not track stats
// should not be called if there are no track stats
require.Equal(t, 0, fixture.analytics.SendStatsCallCount())
}
@@ -482,7 +483,7 @@ func Test_AddUpTrack(t *testing.T) {
require.Equal(t, 1, len(stats))
require.Equal(t, livekit.StreamType_UPSTREAM, stats[0].Kind)
require.Equal(t, totalBytes, stats[0].Streams[0].TotalPrimaryBytes)
require.Equal(t, totalPackets, uint32(stats[0].Streams[0].TotalPrimaryPackets))
require.Equal(t, totalPackets, stats[0].Streams[0].TotalPrimaryPackets)
require.Equal(t, string(trackID), stats[0].TrackId)
}