mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 08:56:41 +01:00
Location order on packages should consider evidence annotations when sorting (#3720)
* fix: sorting locations should consider pkg evidence Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * simplify location test options for comparison Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -139,14 +139,14 @@ func Test_stdlibPackageAndRelationships_values(t *testing.T) {
|
||||
require.Len(t, gotPkgs, 1)
|
||||
|
||||
gotPkg := gotPkgs[0]
|
||||
if d := cmp.Diff(expectedPkg, gotPkg, cmptest.DefaultCommonOptions()...); d != "" {
|
||||
if d := cmp.Diff(expectedPkg, gotPkg, cmptest.DefaultOptions()...); d != "" {
|
||||
t.Errorf("unexpected package (-want +got): %s", d)
|
||||
}
|
||||
|
||||
require.Len(t, gotRels, 1)
|
||||
gotRel := gotRels[0]
|
||||
|
||||
if d := cmp.Diff(expectedRel, gotRel, cmptest.DefaultCommonOptions()...); d != "" {
|
||||
if d := cmp.Diff(expectedRel, gotRel, cmptest.DefaultOptions()...); d != "" {
|
||||
t.Errorf("unexpected relationship (-want +got): %s", d)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user