mirror of
https://github.com/anchore/syft.git
synced 2026-10-31 14:36:33 +01:00
Internalize majority of cmd package (#2533)
* 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>
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/anchore/syft/cmd/syft/cli/options"
|
||||
"github.com/anchore/syft/syft/format"
|
||||
"github.com/anchore/syft/syft/format/template"
|
||||
)
|
||||
@@ -22,12 +21,7 @@ func TestAllFormatsExpressible(t *testing.T) {
|
||||
assertSuccessfulReturnCode,
|
||||
}
|
||||
|
||||
opts := options.DefaultOutput()
|
||||
require.NoError(t, opts.PostLoad())
|
||||
encoders, err := opts.Encoders()
|
||||
require.NoError(t, err)
|
||||
|
||||
encs := format.NewEncoderCollection(encoders...)
|
||||
encs := format.NewEncoderCollection(format.Encoders()...)
|
||||
formatIDs := encs.IDs()
|
||||
require.NotEmpty(t, formatIDs)
|
||||
for _, o := range formatIDs {
|
||||
|
||||
Reference in New Issue
Block a user