Check fields in testutil AssertDoesNotContainsTaggedFields (#5365)
This commit is contained in:
@@ -340,9 +340,10 @@ func (a *Accumulator) AssertDoesNotContainsTaggedFields(
|
||||
continue
|
||||
}
|
||||
|
||||
if p.Measurement == measurement {
|
||||
assert.Equal(t, fields, p.Fields)
|
||||
msg := fmt.Sprintf("found measurement %s with tags %v which should not be there", measurement, tags)
|
||||
if p.Measurement == measurement && reflect.DeepEqual(fields, p.Fields) {
|
||||
msg := fmt.Sprintf(
|
||||
"found measurement %s with tagged fields (tags %v) which should not be there",
|
||||
measurement, tags)
|
||||
assert.Fail(t, msg)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user