fix: Follow symlinks when searching for globs in all-layers scope (#1221)

This commit is contained in:
Keith Zantow
2022-09-30 13:01:08 -04:00
committed by GitHub
parent dd7c654ed0
commit 4d2f18218c
3 changed files with 23 additions and 1 deletions
@@ -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)
}
}
@@ -0,0 +1,2 @@
FROM registry.suse.com/suse/sle15:15.3.17.20.20
RUN zypper in -y wget