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",
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"),
},
},
{
@ -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"),
},
},
{
@ -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"),
},
},
{
@ -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()