mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
* internalize majority of cmd package and migrate integration tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * add internal api encoder Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * create internal representation of all formats Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * export capability to get default encoders Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * restore test fixtures Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
26 lines
537 B
Go
26 lines
537 B
Go
package integration
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/anchore/syft/syft/linux"
|
|
"github.com/anchore/syft/syft/source"
|
|
)
|
|
|
|
func TestDistroImage(t *testing.T) {
|
|
sbom, _ := catalogFixtureImage(t, "image-distro-id", source.SquashedScope)
|
|
|
|
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)
|
|
}
|