From cb58b5a021f8c330c3f53ba2fcd35c3d62806453 Mon Sep 17 00:00:00 2001 From: Erin Call Date: Tue, 24 Dec 2019 15:49:47 -0800 Subject: [PATCH] Phrase errors in Execute the same as in Prepare [#33] --- internal/helm/plan.go | 2 +- internal/helm/plan_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/helm/plan.go b/internal/helm/plan.go index 1d4ced9..7a753e5 100644 --- a/internal/helm/plan.go +++ b/internal/helm/plan.go @@ -85,7 +85,7 @@ func (p *Plan) Execute() error { } if err := step.Execute(p.runCfg); err != nil { - return fmt.Errorf("in execution step %d: %w", i, err) + return fmt.Errorf("while executing %T step: %w", step, err) } } diff --git a/internal/helm/plan_test.go b/internal/helm/plan_test.go index 7c8c22b..5a6550a 100644 --- a/internal/helm/plan_test.go +++ b/internal/helm/plan_test.go @@ -129,7 +129,7 @@ func (suite *PlanTestSuite) TestExecuteAbortsOnError() { Return(fmt.Errorf("oh, he'll gnaw")) err := plan.Execute() - suite.EqualError(err, "in execution step 0: oh, he'll gnaw") + suite.EqualError(err, "while executing *helm.MockStep step: oh, he'll gnaw") } func (suite *PlanTestSuite) TestUpgrade() {