From 50408b52d196133ed3cd66baeeaca1cfd04185f3 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Sun, 10 Oct 2021 18:57:44 -0700 Subject: [PATCH] update integration test to reference new format options Signed-off-by: Alex Goodman --- .../package_ownership_relationship_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/integration/package_ownership_relationship_test.go b/test/integration/package_ownership_relationship_test.go index 67dfb3499..b2651ad97 100644 --- a/test/integration/package_ownership_relationship_test.go +++ b/test/integration/package_ownership_relationship_test.go @@ -3,10 +3,13 @@ package integration import ( "bytes" "encoding/json" - exportedPackages "github.com/anchore/syft/syft/presenter/packages" "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) { @@ -24,7 +27,7 @@ func TestPackageOwnershipRelationships(t *testing.T) { t.Run(test.fixture, func(t *testing.T) { catalog, d, src := catalogFixtureImage(t, test.fixture) - p := exportedPackages.Presenter(exportedPackages.JSONPresenterOption, exportedPackages.PresenterConfig{ + p := exportedPackages.Presenter(format.JSONOption, exportedPackages.Config{ SourceMetadata: src.Metadata, Catalog: catalog, Distro: d, @@ -39,7 +42,7 @@ func TestPackageOwnershipRelationships(t *testing.T) { t.Fatalf("unable to present: %+v", err) } - var doc internalPackages.JSONDocument + var doc model.Document decoder := json.NewDecoder(output) if err := decoder.Decode(&doc); err != nil { t.Fatalf("unable to decode json doc: %+v", err)