github.com/anchore/syft@v1.38.2/cmd/syft/internal/test/integration/regression_photon_package_test.go (about)

     1  package integration
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  
     8  	"github.com/anchore/syft/syft/pkg"
     9  	"github.com/anchore/syft/syft/source"
    10  )
    11  
    12  func TestPhotonPackageRegression(t *testing.T) { // Regression: https://github.com/anchore/syft/pull/1997
    13  	sbom, _ := catalogFixtureImage(t, "image-photon-all-layers", source.AllLayersScope)
    14  	var count int
    15  	for range sbom.Artifacts.Packages.Enumerate(pkg.RpmPkg) {
    16  		count++
    17  	}
    18  
    19  	assert.Greater(t, count, 0, "expected to find RPM packages in the SBOM (but did not)")
    20  }