diff --git a/cmd/config/internal/commands/fmt_test.go b/cmd/config/internal/commands/fmt_test.go index 16ba273899..c0918ac4f5 100644 --- a/cmd/config/internal/commands/fmt_test.go +++ b/cmd/config/internal/commands/fmt_test.go @@ -164,7 +164,7 @@ func TestCmd_failFileContents(t *testing.T) { err := r.Command.Execute() // expect an error - assert.EqualError(t, err, "yaml: line 1: did not find expected node content") + assert.EqualError(t, err, "MalformedYAMLError: yaml: line 1: did not find expected node content") } func TestFmtSubPackages(t *testing.T) { diff --git a/kyaml/kio/filters/fmtr_test.go b/kyaml/kio/filters/fmtr_test.go index a79e4eb9bd..697b1c6654 100644 --- a/kyaml/kio/filters/fmtr_test.go +++ b/kyaml/kio/filters/fmtr_test.go @@ -673,7 +673,7 @@ apiVersion: example.com/v1beta1 ` _, err := FormatInput(strings.NewReader(y)) - assert.EqualError(t, err, "yaml: line 15: found character that cannot start any token") + assert.EqualError(t, err, "MalformedYAMLError: yaml: line 15: found character that cannot start any token") } // TestFormatFileOrDirectory_yamlExtFile verifies that FormatFileOrDirectory will format a file