mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
Migrate format definitions to sbom package (#864)
This commit is contained in:
@@ -2,10 +2,11 @@ package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/stretchr/testify/require"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/anchore/syft/syft/format"
|
||||
"github.com/anchore/syft/syft"
|
||||
)
|
||||
|
||||
func TestAllFormatsExpressible(t *testing.T) {
|
||||
@@ -18,8 +19,9 @@ func TestAllFormatsExpressible(t *testing.T) {
|
||||
},
|
||||
assertSuccessfulReturnCode,
|
||||
}
|
||||
|
||||
for _, o := range format.AllOptions {
|
||||
formats := syft.FormatIDs()
|
||||
require.NotEmpty(t, formats)
|
||||
for _, o := range formats {
|
||||
t.Run(fmt.Sprintf("format:%s", o), func(t *testing.T) {
|
||||
cmd, stdout, stderr := runSyft(t, nil, "dir:./test-fixtures/image-pkg-coverage", "-o", string(o))
|
||||
for _, traitFn := range commonAssertions {
|
||||
|
||||
@@ -122,8 +122,6 @@ func TestLogFile(t *testing.T) {
|
||||
request := "docker-archive:" + getFixtureImage(t, "image-pkg-coverage")
|
||||
|
||||
envLogFile := filepath.Join(os.TempDir(), "a-pretty-log-file.log")
|
||||
t.Logf("log file path: %s", envLogFile)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
args []string
|
||||
|
||||
Reference in New Issue
Block a user