chore: fix cataloger_test (#1603)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow 2023-02-22 12:30:41 -05:00 committed by GitHub
parent f5e20521e0
commit 4bf677d555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,10 +179,8 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
Version: "5.12.5", Version: "5.12.5",
Type: "binary", Type: "binary",
PURL: "pkg:generic/perl@5.12.5", PURL: "pkg:generic/perl@5.12.5",
Locations: singleLocation("perl"), Locations: locations("perl"),
Metadata: pkg.BinaryMetadata{ Metadata: metadata("perl-binary"),
Classifier: "perl-binary",
},
}, },
}, },
{ {
@ -193,10 +191,8 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
Version: "5.20.0", Version: "5.20.0",
Type: "binary", Type: "binary",
PURL: "pkg:generic/perl@5.20.0", PURL: "pkg:generic/perl@5.20.0",
Locations: singleLocation("perl"), Locations: locations("perl"),
Metadata: pkg.BinaryMetadata{ Metadata: metadata("perl-binary"),
Classifier: "perl-binary",
},
}, },
}, },
{ {
@ -207,10 +203,8 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
Version: "5.37.8", Version: "5.37.8",
Type: "binary", Type: "binary",
PURL: "pkg:generic/perl@5.37.8", PURL: "pkg:generic/perl@5.37.8",
Locations: singleLocation("perl"), Locations: locations("perl"),
Metadata: pkg.BinaryMetadata{ Metadata: metadata("perl-binary"),
Classifier: "perl-binary",
},
}, },
}, },
{ {
@ -635,6 +629,8 @@ func (p *panicyResolver) FileMetadataByLocation(_ source.Location) (source.FileM
return source.FileMetadata{}, errors.New("not implemented") return source.FileMetadata{}, errors.New("not implemented")
} }
var _ source.FileResolver = (*panicyResolver)(nil)
func Test_Cataloger_ResilientToErrors(t *testing.T) { func Test_Cataloger_ResilientToErrors(t *testing.T) {
c := NewCataloger() c := NewCataloger()