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