Skip to content

Commit

Permalink
Fix the test
Browse files Browse the repository at this point in the history
  • Loading branch information
sirenko committed Nov 9, 2023
1 parent 5a4e7ec commit f6cb498
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions core/services/telemetry/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,14 @@ func TestLegacyMode(t *testing.T) {
require.Len(t, clientSent, 6)

require.Equal(t, 1, obsLogs.Len()) // Deprecation warning for TelemetryIngress.URL and TelemetryIngress.ServerPubKey
require.Equal(t, []byte("endpoint-1-message-1"), clientSent[0].Telemetry)
require.Equal(t, []byte("endpoint-1-message-2"), clientSent[1].Telemetry)
require.Equal(t, []byte("endpoint-1-message-3"), clientSent[2].Telemetry)
require.Equal(t, []byte("endpoint-2-message-1"), clientSent[3].Telemetry)
require.Equal(t, []byte("endpoint-2-message-2"), clientSent[4].Telemetry)
require.Equal(t, []byte("endpoint-2-message-3"), clientSent[5].Telemetry)
// disable false positive linter, it misses the size check above
// nolint: gosec
if len(clientSent) >= 6 {
require.Equal(t, []byte("endpoint-1-message-1"), clientSent[0].Telemetry)
require.Equal(t, []byte("endpoint-1-message-2"), clientSent[1].Telemetry)
require.Equal(t, []byte("endpoint-1-message-3"), clientSent[2].Telemetry)
require.Equal(t, []byte("endpoint-2-message-1"), clientSent[3].Telemetry)
require.Equal(t, []byte("endpoint-2-message-2"), clientSent[4].Telemetry)
require.Equal(t, []byte("endpoint-2-message-3"), clientSent[5].Telemetry)
}
}

0 comments on commit f6cb498

Please sign in to comment.