mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
* remove strong distro type Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * bump json schema to v3 (breaking distro shape) Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * fix linting Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * allow for v2 decoding of distro idLikes field in v3 json decoder Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * fix casing in simple linux release name Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * use discovered name as pretty name in simple linux release Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
25 lines
476 B
Go
25 lines
476 B
Go
package integration
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/anchore/syft/syft/linux"
|
|
)
|
|
|
|
func TestDistroImage(t *testing.T) {
|
|
sbom, _ := catalogFixtureImage(t, "image-distro-id")
|
|
|
|
expected := &linux.Release{
|
|
PrettyName: "BusyBox v1.31.1",
|
|
Name: "busybox",
|
|
ID: "busybox",
|
|
IDLike: []string{"busybox"},
|
|
Version: "1.31.1",
|
|
VersionID: "1.31.1",
|
|
}
|
|
|
|
assert.Equal(t, expected, sbom.Artifacts.LinuxDistribution)
|
|
}
|