Fix diff error obfuscating binary test failures message (#2468)

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
Laurent Goderre 2024-01-04 12:54:52 -05:00 committed by GitHub
parent 4c20a74d2f
commit c72d295719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -953,8 +953,8 @@ func assertPackagesAreEqual(t *testing.T, expected pkg.Package, p pkg.Package) {
cmp.Transformer("Locations", func(l file.LocationSet) []file.Location {
return l.ToSlice()
}),
cmpopts.IgnoreUnexported(pkg.Package{}, file.Location{}),
cmpopts.IgnoreFields(pkg.Package{}, "CPEs", "FoundBy", "MetadataType", "Type"),
cmpopts.IgnoreUnexported(pkg.Package{}, file.LocationData{}),
cmpopts.IgnoreFields(pkg.Package{}, "CPEs", "FoundBy", "Type", "Locations", "Licenses"),
))
}
}