mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 22:12:28 +01:00
feat: Allow specific versions of formats to be specified (#1543)
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/anchore/syft/syft"
|
||||
"github.com/anchore/syft/syft/formats"
|
||||
"github.com/anchore/syft/syft/formats/template"
|
||||
)
|
||||
|
||||
@@ -21,9 +21,9 @@ func TestAllFormatsExpressible(t *testing.T) {
|
||||
},
|
||||
assertSuccessfulReturnCode,
|
||||
}
|
||||
formats := syft.FormatIDs()
|
||||
require.NotEmpty(t, formats)
|
||||
for _, o := range formats {
|
||||
formatNames := formats.AllIDs()
|
||||
require.NotEmpty(t, formatNames)
|
||||
for _, o := range formatNames {
|
||||
t.Run(fmt.Sprintf("format:%s", o), func(t *testing.T) {
|
||||
args := []string{"dir:./test-fixtures/image-pkg-coverage", "-o", string(o)}
|
||||
if o == template.ID {
|
||||
|
||||
Reference in New Issue
Block a user