github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/cmd/syft/internal/test/integration/mariner_distroless_test.go (about) 1 package integration 2 3 import ( 4 "testing" 5 6 "github.com/anchore/syft/syft/pkg" 7 "github.com/anchore/syft/syft/source" 8 ) 9 10 func TestMarinerDistroless(t *testing.T) { 11 sbom, _ := catalogFixtureImage(t, "image-mariner-distroless", source.SquashedScope) 12 13 expectedPkgs := 12 14 actualPkgs := 0 15 for range sbom.Artifacts.Packages.Enumerate(pkg.RpmPkg) { 16 actualPkgs += 1 17 } 18 19 if actualPkgs != expectedPkgs { 20 t.Errorf("unexpected number of RPM packages: %d != %d", expectedPkgs, actualPkgs) 21 } 22 }