Skip to content

Commit

Permalink
chore: fix cataloger_test (anchore#1603)
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Zantow <kzantow@gmail.com>
  • Loading branch information
kzantow committed Feb 22, 2023
1 parent 0aed868 commit 1d54391
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions syft/pkg/cataloger/binary/cataloger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,8 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
Version: "5.12.5",
Type: "binary",
PURL: "pkg:generic/perl@5.12.5",
Locations: singleLocation("perl"),
Metadata: pkg.BinaryMetadata{
Classifier: "perl-binary",
},
Locations: locations("perl"),
Metadata: metadata("perl-binary"),
},
},
{
Expand All @@ -193,10 +191,8 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
Version: "5.20.0",
Type: "binary",
PURL: "pkg:generic/perl@5.20.0",
Locations: singleLocation("perl"),
Metadata: pkg.BinaryMetadata{
Classifier: "perl-binary",
},
Locations: locations("perl"),
Metadata: metadata("perl-binary"),
},
},
{
Expand All @@ -207,10 +203,8 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
Version: "5.37.8",
Type: "binary",
PURL: "pkg:generic/perl@5.37.8",
Locations: singleLocation("perl"),
Metadata: pkg.BinaryMetadata{
Classifier: "perl-binary",
},
Locations: locations("perl"),
Metadata: metadata("perl-binary"),
},
},
{
Expand Down Expand Up @@ -635,6 +629,8 @@ func (p *panicyResolver) FileMetadataByLocation(_ source.Location) (source.FileM
return source.FileMetadata{}, errors.New("not implemented")
}

var _ source.FileResolver = (*panicyResolver)(nil)

func Test_Cataloger_ResilientToErrors(t *testing.T) {
c := NewCataloger()

Expand Down

0 comments on commit 1d54391

Please sign in to comment.