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:
Alex Goodman
2024-01-22 16:31:41 +00:00
committed by GitHub
parent c6ce1de928
commit 4c77783461
4 changed files with 213 additions and 3 deletions
+1 -1
View File
@@ -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) {
+2 -1
View File
@@ -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 {