Skip to content

Commit

Permalink
Make test more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
srebhan committed Sep 3, 2024
1 parent a50da49 commit 67b0ae0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/inputs/opentelemetry/opentelemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,13 @@ func TestOpenTelemetry(t *testing.T) {
telegraf.Counter,
),
}
options := []cmp.Option{
testutil.IgnoreTime(),
testutil.IgnoreFields("start_time_unix_nano"),
testutil.IgnoreTags("telemetry.sdk.version"),
}
actual := acc.GetTelegrafMetrics()
testutil.RequireMetricsEqual(t, expected, actual, testutil.IgnoreTime(), testutil.IgnoreFields("start_time_unix_nano"))
testutil.RequireMetricsEqual(t, expected, actual, options...)
}

func TestCases(t *testing.T) {
Expand Down

0 comments on commit 67b0ae0

Please sign in to comment.