@@ -1101,15 +1101,15 @@ func TestReconciler_reconcileVariables(t *testing.T) {
1101
1101
wantErrMessage : "failed to discover variables for ClusterClass class1: [" +
1102
1102
"patch1.variables[cpu].schema.openAPIV3Schema.properties[nestedField].default: Invalid value: \" integer\" : failed rule: self >= 1, " +
1103
1103
"patch1.variables[anotherCPU].schema.openAPIV3Schema.x-kubernetes-validations[0].messageExpression: Invalid value: " +
1104
- "apiextensions.ValidationRule{ Rule:\" self > = 1\" , Message:\" \" , MessageExpression:\" 'Expected integer greater or equal to 1, got ' + this does not compile\" , " +
1105
- "Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\" \" , OptionalOldSelf:(*bool)(nil) }: " +
1104
+ "{ \" Rule\" :\" self \\ u003e = 1\" ,\" Message\" :\" \" ,\" MessageExpression\" :\" 'Expected integer greater or equal to 1, got ' + this does not compile\" ," +
1105
+ "\" Reason\" :null, \" FieldPath\" :\" \" ,\" OptionalOldSelf\" :null }: " +
1106
1106
"messageExpression compilation failed: ERROR: <input>:1:55: Syntax error: mismatched input 'does' expecting <EOF>\n " +
1107
1107
"| 'Expected integer greater or equal to 1, got ' + this does not compile\n " +
1108
1108
"| ......................................................^]" ,
1109
1109
wantVariableDiscoveryErrorMessage : "VariableDiscovery failed: [patch1.variables[cpu].schema.openAPIV3Schema.properties[nestedField].default: Invalid value: \" integer\" : failed rule: self >= 1, " +
1110
1110
"patch1.variables[anotherCPU].schema.openAPIV3Schema.x-kubernetes-validations[0].messageExpression: Invalid value: " +
1111
- "apiextensions.ValidationRule{ Rule:\" self > = 1\" , Message:\" \" , MessageExpression:\" 'Expected integer greater or equal to 1, got ' + this does not compile\" , " +
1112
- "Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\" \" , OptionalOldSelf:(*bool)(nil) }: " +
1111
+ "{ \" Rule\" :\" self \\ u003e = 1\" ,\" Message\" :\" \" ,\" MessageExpression\" :\" 'Expected integer greater or equal to 1, got ' + this does not compile\" ," +
1112
+ "\" Reason\" :null, \" FieldPath\" :\" \" ,\" OptionalOldSelf\" :null }: " +
1113
1113
"messageExpression compilation failed: ERROR: <input>:1:55: Syntax error: mismatched input 'does' expecting <EOF>\n " +
1114
1114
"| 'Expected integer greater or equal to 1, got ' + this does not compile\n " +
1115
1115
"| ......................................................^]" ,
@@ -1150,15 +1150,15 @@ func TestReconciler_reconcileVariables(t *testing.T) {
1150
1150
},
1151
1151
wantErrMessage : "failed to discover variables for ClusterClass class1: " +
1152
1152
"patch1.variables[someIP].schema.openAPIV3Schema.x-kubernetes-validations[0].rule: Invalid value: " +
1153
- "apiextensions.ValidationRule{ Rule:\" ip(self).family() == 6\" , Message:\" \" , MessageExpression:\" \" , Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\" \" , OptionalOldSelf:(*bool)(nil) }: compilation failed: " +
1153
+ "{ \" Rule\" :\" ip(self).family() == 6\" ,\" Message\" :\" \" ,\" MessageExpression\" :\" \" ,\" Reason\" :null, \" FieldPath\" :\" \" ,\" OptionalOldSelf\" :null }: compilation failed: " +
1154
1154
"ERROR: <input>:1:3: undeclared reference to 'ip' (in container '')\n " +
1155
1155
" | ip(self).family() == 6\n " +
1156
1156
" | ..^\n " +
1157
1157
"ERROR: <input>:1:16: undeclared reference to 'family' (in container '')\n " +
1158
1158
" | ip(self).family() == 6\n " +
1159
1159
" | ...............^" ,
1160
1160
wantVariableDiscoveryErrorMessage : "VariableDiscovery failed: patch1.variables[someIP].schema.openAPIV3Schema.x-kubernetes-validations[0].rule: Invalid value: " +
1161
- "apiextensions.ValidationRule{ Rule:\" ip(self).family() == 6\" , Message:\" \" , MessageExpression:\" \" , Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\" \" , OptionalOldSelf:(*bool)(nil) }: compilation failed: " +
1161
+ "{ \" Rule\" :\" ip(self).family() == 6\" ,\" Message\" :\" \" ,\" MessageExpression\" :\" \" ,\" Reason\" :null, \" FieldPath\" :\" \" ,\" OptionalOldSelf\" :null }: compilation failed: " +
1162
1162
"ERROR: <input>:1:3: undeclared reference to 'ip' (in container '')\n " +
1163
1163
" | ip(self).family() == 6\n " +
1164
1164
" | ..^\n " +
0 commit comments