Skip to content

Commit 10c819c

Browse files
committed
Adjust to changes in validation error messages
Signed-off-by: Stefan Büringer [email protected]
1 parent 9f6a8ba commit 10c819c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/crd/validation_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ spec:
7575
a: "a"
7676
c: "c"
7777
`,
78-
wantErr: `spec.firstTypeWithOneof: Invalid value: "object": at most one of the fields in [foo bar] may be set`,
78+
wantErr: `spec.firstTypeWithOneof: Invalid value: at most one of the fields in [foo bar] may be set`,
7979
},
8080
{
8181
name: "ExactlyOneOf constraint violated by specifying both fields secondTypeWithExactOneof.c&d",
@@ -94,7 +94,7 @@ spec:
9494
c: "c"
9595
d: "d"
9696
`,
97-
wantErr: `spec.secondTypeWithExactOneof: Invalid value: "object": exactly one of the fields in [c d] must be set`,
97+
wantErr: `spec.secondTypeWithExactOneof: Invalid value: exactly one of the fields in [c d] must be set`,
9898
},
9999
{
100100
name: "ExactlyOneOf constraint violated by not specifying field secondTypeWithExactOneof.c|d",
@@ -109,7 +109,7 @@ spec:
109109
secondTypeWithExactOneof:
110110
a: "a"
111111
`,
112-
wantErr: `spec.secondTypeWithExactOneof: Invalid value: "object": exactly one of the fields in [c d] must be set`,
112+
wantErr: `spec.secondTypeWithExactOneof: Invalid value: exactly one of the fields in [c d] must be set`,
113113
},
114114
{
115115
name: "AtLeastOneOf constraint violated by not specifying field typeWithAllOneOf.e|f",
@@ -122,7 +122,7 @@ spec:
122122
typeWithAllOneOf:
123123
c: "c"
124124
`,
125-
wantErr: `spec.typeWithAllOneOf: Invalid value: "object": at least one of the fields in [e f] must be set`,
125+
wantErr: `spec.typeWithAllOneOf: Invalid value: at least one of the fields in [e f] must be set`,
126126
},
127127
}
128128

0 commit comments

Comments
 (0)