mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
update integration test to reference new format options
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
c00afc7fa9
commit
50408b52d1
@ -3,10 +3,13 @@ package integration
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
exportedPackages "github.com/anchore/syft/syft/presenter/packages"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
internalPackages "github.com/anchore/syft/internal/presenter/packages"
|
"github.com/anchore/syft/internal/formats/syftjson/model"
|
||||||
|
|
||||||
|
"github.com/anchore/syft/syft/format"
|
||||||
|
|
||||||
|
exportedPackages "github.com/anchore/syft/syft/presenter/packages"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPackageOwnershipRelationships(t *testing.T) {
|
func TestPackageOwnershipRelationships(t *testing.T) {
|
||||||
@ -24,7 +27,7 @@ func TestPackageOwnershipRelationships(t *testing.T) {
|
|||||||
t.Run(test.fixture, func(t *testing.T) {
|
t.Run(test.fixture, func(t *testing.T) {
|
||||||
catalog, d, src := catalogFixtureImage(t, test.fixture)
|
catalog, d, src := catalogFixtureImage(t, test.fixture)
|
||||||
|
|
||||||
p := exportedPackages.Presenter(exportedPackages.JSONPresenterOption, exportedPackages.PresenterConfig{
|
p := exportedPackages.Presenter(format.JSONOption, exportedPackages.Config{
|
||||||
SourceMetadata: src.Metadata,
|
SourceMetadata: src.Metadata,
|
||||||
Catalog: catalog,
|
Catalog: catalog,
|
||||||
Distro: d,
|
Distro: d,
|
||||||
@ -39,7 +42,7 @@ func TestPackageOwnershipRelationships(t *testing.T) {
|
|||||||
t.Fatalf("unable to present: %+v", err)
|
t.Fatalf("unable to present: %+v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
var doc internalPackages.JSONDocument
|
var doc model.Document
|
||||||
decoder := json.NewDecoder(output)
|
decoder := json.NewDecoder(output)
|
||||||
if err := decoder.Decode(&doc); err != nil {
|
if err := decoder.Decode(&doc); err != nil {
|
||||||
t.Fatalf("unable to decode json doc: %+v", err)
|
t.Fatalf("unable to decode json doc: %+v", err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user