mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
fix: Follow symlinks when searching for globs in all-layers scope (#1221)
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user