Skip to content

Commit

Permalink
ROX-19013 Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ludydoo committed Sep 14, 2023
1 parent bfd05a7 commit 641e3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/dinosaur/pkg/gitops/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ centrals:
name: "invalid yaml in patch",
assert: func(t *testing.T, c *Config, err field.ErrorList) {
require.Len(t, err, 1)
assert.Equal(t, field.Invalid(field.NewPath("centrals", "overrides").Index(0).Child("patch"), "foo", "invalid patch: yaml: unmarshal errors:\n line 1: cannot unmarshal !!str `foo` into v1alpha1.Central"), err[0])
assert.Equal(t, field.Invalid(field.NewPath("centrals", "overrides").Index(0).Child("patch"), "foo", "invalid patch: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type v1alpha1.Central"), err[0])
},
yaml: `
centrals:
Expand All @@ -46,7 +46,7 @@ centrals:
name: "patch contains un-mergeable fields",
assert: func(t *testing.T, c *Config, err field.ErrorList) {
require.Len(t, err, 1)
assert.Equal(t, field.Invalid(field.NewPath("centrals", "overrides").Index(0).Child("patch"), "spec: 123\n", "invalid patch: yaml: unmarshal errors:\n line 1: cannot unmarshal !!int `123` into v1alpha1.CentralSpec"), err[0])
assert.Equal(t, field.Invalid(field.NewPath("centrals", "overrides").Index(0).Child("patch"), "spec: 123\n", "invalid patch: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal number into Go struct field Central.spec of type v1alpha1.CentralSpec"), err[0])
},
yaml: `
centrals:
Expand Down

0 comments on commit 641e3da

Please sign in to comment.