diff --git a/test/e2e/cli_test.go b/test/e2e/cli_test.go index d9c62d5c0bf4..60d7a62db092 100644 --- a/test/e2e/cli_test.go +++ b/test/e2e/cli_test.go @@ -385,14 +385,14 @@ func (s *CLISuite) TestWorkflowLint() { }) s.Run("LintFileEmptyParamDAG", func() { s.Given().RunCli([]string{"lint", "expectedfailures/empty-parameter-dag.yaml"}, func(t *testing.T, output string, err error) { - if assert.Error(t, err, "exit status 1") { + if assert.EqualError(t, err, "exit status 1") { assert.Contains(t, output, "templates.abc.tasks.a templates.whalesay inputs.parameters.message was not supplied") } }) }) s.Run("LintFileEmptyParamSteps", func() { s.Given().RunCli([]string{"lint", "expectedfailures/empty-parameter-steps.yaml"}, func(t *testing.T, output string, err error) { - if assert.Error(t, err, "exit status 1") { + if assert.EqualError(t, err, "exit status 1") { assert.Contains(t, output, "templates.abc.steps[0].a templates.whalesay inputs.parameters.message was not supplied") } }) @@ -514,7 +514,7 @@ func (s *CLISuite) TestTemplate() { }) s.Run("Get", func() { s.Given().RunCli([]string{"template", "get", "not-found"}, func(t *testing.T, output string, err error) { - if assert.Error(t, err, "exit status 1") { + if assert.EqualError(t, err, "exit status 1") { assert.Contains(t, output, `"not-found" not found`) } @@ -625,7 +625,7 @@ func (s *CLISuite) TestCron() { }) s.Run("Get", func() { s.Given().RunCli([]string{"cron", "get", "not-found"}, func(t *testing.T, output string, err error) { - if assert.Error(t, err, "exit status 1") { + if assert.EqualError(t, err, "exit status 1") { assert.Contains(t, output, `\"not-found\" not found`) } diff --git a/workflow/common/util_test.go b/workflow/common/util_test.go index 162d6b0e14c6..708393b3f59f 100644 --- a/workflow/common/util_test.go +++ b/workflow/common/util_test.go @@ -66,5 +66,5 @@ spec: ` _, err = SplitWorkflowYAMLFile([]byte(invalidWf), false) - assert.Error(t, err, `unknown field "doesNotExist"`) + assert.EqualError(t, err, `error unmarshaling JSON: while decoding JSON: json: unknown field "doesNotExist"`) }