mirror of
https://github.com/anchore/syft
synced 2024-11-15 00:27:07 +00:00
21 lines
675 B
Go
21 lines
675 B
Go
|
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)
|
||
|
}
|
||
|
}
|