github.com/noqcks/syft@v0.0.0-20230920222752-a9e2c4e288e5/test/integration/distro_test.go (about) 1 package integration 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 8 "github.com/anchore/syft/syft/linux" 9 "github.com/anchore/syft/syft/source" 10 ) 11 12 func TestDistroImage(t *testing.T) { 13 sbom, _ := catalogFixtureImage(t, "image-distro-id", source.SquashedScope, nil) 14 15 expected := &linux.Release{ 16 PrettyName: "BusyBox v1.31.1", 17 Name: "busybox", 18 ID: "busybox", 19 IDLike: []string{"busybox"}, 20 Version: "1.31.1", 21 VersionID: "1.31.1", 22 } 23 24 assert.Equal(t, expected, sbom.Artifacts.LinuxDistribution) 25 }