forked from anchore/syft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add coverage for new rpmdb paths (anchore#1999)
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
- Loading branch information
Showing
6 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package integration | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/anchore/syft/syft/pkg" | ||
"github.com/anchore/syft/syft/source" | ||
) | ||
|
||
func TestPhotonPackageRegression(t *testing.T) { // Regression: https://github.com/anchore/syft/pull/1997 | ||
sbom, _ := catalogFixtureImage(t, "image-photon-all-layers", source.AllLayersScope, nil) | ||
var packages []pkg.Package | ||
for p := range sbom.Artifacts.Packages.Enumerate() { | ||
packages = append(packages, p) | ||
} | ||
|
||
if len(packages) < 1 { | ||
t.Errorf("failed to find packages for photon distro; wanted > 0 got 0") | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/integration/test-fixtures/image-photon-all-layers/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM photon:5.0-20230729 |