Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
shaan420 committed Oct 27, 2023
1 parent a563396 commit ab28ef7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions m3/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,15 +599,18 @@ func TestReporterCommmonTagsInternal(t *testing.T) {
for k, v := range internalTags {
require.True(t, tagEquals(metric.Tags, k, v))
}

// The following tags should be redacted.
require.True(t, tagEquals(metric.Tags, "host", DefaultTagRedactValue))
require.True(t, tagEquals(metric.Tags, "instance", DefaultTagRedactValue))
} else {
require.Equal(t, "testCounter1", metric.Name)
require.False(t, tagIncluded(metric.Tags, "internal1"))
require.False(t, tagIncluded(metric.Tags, "internal2"))
}

// The following tags should not be present as part of the individual metrics
// as they are common tags.
require.False(t, tagIncluded(metric.Tags, "host"))
require.False(t, tagIncluded(metric.Tags, "instance"))
require.False(t, tagIncluded(metric.Tags, "service"))
}
require.Equal(t, internalMetrics, numInternalMetricsActual)
Expand Down

0 comments on commit ab28ef7

Please sign in to comment.