forked from seal-io/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.
fix: Follow symlinks when searching for globs in all-layers scope (an…
- Loading branch information
1 parent
1fb0d7f
commit 762183a
Showing
3 changed files
with
23 additions
and
1 deletion.
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
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/source" | ||
) | ||
|
||
func Test_AllLayersIncludesSquashed(t *testing.T) { | ||
// This is a verification test for issue #894 (https://github.com/anchore/syft/issues/894) | ||
allLayers, _ := catalogFixtureImage(t, "image-suse-all-layers", source.AllLayersScope, nil) | ||
squashed, _ := catalogFixtureImage(t, "image-suse-all-layers", source.SquashedScope, nil) | ||
|
||
lenAllLayers := len(allLayers.Artifacts.PackageCatalog.Sorted()) | ||
lenSquashed := len(squashed.Artifacts.PackageCatalog.Sorted()) | ||
|
||
if lenAllLayers < lenSquashed { | ||
t.Errorf("squashed has more packages than all-layers: %d > %d", lenSquashed, lenAllLayers) | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
test/integration/test-fixtures/image-suse-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,2 @@ | ||
FROM registry.suse.com/suse/sle15:15.3.17.20.20 | ||
RUN zypper in -y wget |