mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 07:26:34 +01:00
replace power-user presenter with syft-json format
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/anchore/syft/syft/source"
|
||||
)
|
||||
|
||||
func encoder(output io.Writer, s sbom.SBOM) error {
|
||||
func encoder(output io.Writer, s sbom.SBOM, _ interface{}) error {
|
||||
// init the tabular writer
|
||||
w := new(tabwriter.Writer)
|
||||
w.Init(output, 0, 8, 0, '\t', tabwriter.AlignRight)
|
||||
|
||||
@@ -11,7 +11,7 @@ var updateTextPresenterGoldenFiles = flag.Bool("update-text", false, "update the
|
||||
|
||||
func TestTextDirectoryPresenter(t *testing.T) {
|
||||
testutils.AssertPresenterAgainstGoldenSnapshot(t,
|
||||
Format().Presenter(testutils.DirectoryInput(t)),
|
||||
Format().Presenter(testutils.DirectoryInput(t), nil),
|
||||
*updateTextPresenterGoldenFiles,
|
||||
)
|
||||
}
|
||||
@@ -19,7 +19,7 @@ func TestTextDirectoryPresenter(t *testing.T) {
|
||||
func TestTextImagePresenter(t *testing.T) {
|
||||
testImage := "image-simple"
|
||||
testutils.AssertPresenterAgainstGoldenImageSnapshot(t,
|
||||
Format().Presenter(testutils.ImageInput(t, testImage, testutils.FromSnapshot())),
|
||||
Format().Presenter(testutils.ImageInput(t, testImage, testutils.FromSnapshot()), nil),
|
||||
testImage,
|
||||
*updateTextPresenterGoldenFiles,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user