diff --git a/internal/runners/export/buildplan.go b/internal/runners/export/buildplan.go index 80a1c3afb9..07aa4c0aea 100644 --- a/internal/runners/export/buildplan.go +++ b/internal/runners/export/buildplan.go @@ -39,14 +39,14 @@ func (b *BuildPlan) Run(params *BuildPlanParams) (rerr error) { return errs.Wrap(err, "Could not get commit") } - bytes, err := commit.BuildScript().MarshalBuildExpression() + bytes, err := commit.BuildPlan().Marshal() if err != nil { - return errs.Wrap(err, "Could not marshal build expression") + return errs.Wrap(err, "Could not marshal build plan") } expr := make(map[string]interface{}) err = json.Unmarshal(bytes, &expr) if err != nil { - return errs.Wrap(err, "Could not unmarshal build expression") + return errs.Wrap(err, "Could not unmarshal build plan") } out.Print(output.Prepare(string(bytes), expr)) diff --git a/test/integration/export_int_test.go b/test/integration/export_int_test.go index 0e31ea0749..2787a0e77a 100644 --- a/test/integration/export_int_test.go +++ b/test/integration/export_int_test.go @@ -152,10 +152,8 @@ func (suite *ExportIntegrationTestSuite) TestExport_BuildPlan() { cp := ts.Spawn("export", "buildplan") cp.Expect("Resolving Dependencies") cp.Expect(`{`) - cp.Expect(`"let":`) - cp.Expect(`"in":`) - cp.Expect(`"runtime":`) - cp.Expect(`"sources":`) + cp.Expect(`"buildPlanID":`) + cp.Expect(`"terminals":`) cp.Expect(`}`) cp.ExpectExitCode(0) } @@ -198,7 +196,7 @@ func (suite *ExportIntegrationTestSuite) TestJSON() { cp.Expect(`{"`) cp.Expect(`}`) cp.ExpectExitCode(0) - AssertValidJSON(suite.T(), cp) + // The buildplan is too large for the snapshot to contain valid JSON. } func TestExportIntegrationTestSuite(t *testing.T) {