mirror of
https://github.com/anchore/syft.git
synced 2026-10-11 21:57:22 +02:00
Re-introduce linux kernel cataloger (#2526)
* re-add linux kernel cataloger Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * ensure there is at least a directory or image tag on each task Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix CLI tests to account for kernel finding (+2) 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:
@@ -9,7 +9,7 @@ import (
|
||||
const (
|
||||
// this is the number of packages that should be found in the image-pkg-coverage fixture image
|
||||
// when analyzed with the squashed scope.
|
||||
coverageImageSquashedPackageCount = 25
|
||||
coverageImageSquashedPackageCount = 27
|
||||
)
|
||||
|
||||
func TestPackagesCmdFlags(t *testing.T) {
|
||||
|
||||
@@ -122,6 +122,7 @@ func assertPackageCount(length uint) traitAssertion {
|
||||
type NameAndVersion struct {
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
type partial struct {
|
||||
Artifacts []NameAndVersion `json:"artifacts"`
|
||||
@@ -136,7 +137,7 @@ func assertPackageCount(length uint) traitAssertion {
|
||||
tb.Errorf("expected package count of %d, but found %d", length, len(data.Artifacts))
|
||||
debugArtifacts := make([]string, len(data.Artifacts))
|
||||
for i, a := range data.Artifacts {
|
||||
debugArtifacts[i] = fmt.Sprintf("%s:%s", a.Name, a.Version)
|
||||
debugArtifacts[i] = fmt.Sprintf("%s@%s (%s)", a.Name, a.Version, a.Type)
|
||||
}
|
||||
sort.Strings(debugArtifacts)
|
||||
for i, a := range debugArtifacts {
|
||||
|
||||
Reference in New Issue
Block a user