mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
23 lines
494 B
Go
23 lines
494 B
Go
package integration
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/anchore/syft/syft/pkg"
|
|
"github.com/anchore/syft/syft/source"
|
|
)
|
|
|
|
func TestMarinerDistroless(t *testing.T) {
|
|
sbom, _ := catalogFixtureImage(t, "image-mariner-distroless", source.SquashedScope, nil)
|
|
|
|
expectedPkgs := 12
|
|
actualPkgs := 0
|
|
for range sbom.Artifacts.Packages.Enumerate(pkg.RpmPkg) {
|
|
actualPkgs += 1
|
|
}
|
|
|
|
if actualPkgs != expectedPkgs {
|
|
t.Errorf("unexpected number of RPM packages: %d != %d", expectedPkgs, actualPkgs)
|
|
}
|
|
}
|