mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
Fix diff error obfuscating binary test failures message (#2468)
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
parent
4c20a74d2f
commit
c72d295719
@ -953,8 +953,8 @@ func assertPackagesAreEqual(t *testing.T, expected pkg.Package, p pkg.Package) {
|
|||||||
cmp.Transformer("Locations", func(l file.LocationSet) []file.Location {
|
cmp.Transformer("Locations", func(l file.LocationSet) []file.Location {
|
||||||
return l.ToSlice()
|
return l.ToSlice()
|
||||||
}),
|
}),
|
||||||
cmpopts.IgnoreUnexported(pkg.Package{}, file.Location{}),
|
cmpopts.IgnoreUnexported(pkg.Package{}, file.LocationData{}),
|
||||||
cmpopts.IgnoreFields(pkg.Package{}, "CPEs", "FoundBy", "MetadataType", "Type"),
|
cmpopts.IgnoreFields(pkg.Package{}, "CPEs", "FoundBy", "Type", "Locations", "Licenses"),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user