@@ -1140,8 +1140,7 @@ func TestBuildGRPCRoute(t *testing.T) {
1140
1140
},
1141
1141
},
1142
1142
Conditions : []conditions.Condition {
1143
- conditions .NewRouteUnsupportedField ("There are rules with unsupported fields configurations: " +
1144
- "spec.rules[0].name: Forbidden: rule names are not supported" ),
1143
+ conditions .NewRouteUnsupportedField ("spec.rules[0].name: Forbidden: Name" ),
1145
1144
},
1146
1145
},
1147
1146
name : "valid route with unsupported field" ,
@@ -1176,8 +1175,7 @@ func TestBuildGRPCRoute(t *testing.T) {
1176
1175
},
1177
1176
},
1178
1177
Conditions : []conditions.Condition {
1179
- conditions .NewRouteUnsupportedField ("There are rules with unsupported fields configurations: " +
1180
- "spec.rules[0].name: Forbidden: rule names are not supported" ),
1178
+ conditions .NewRouteUnsupportedField ("spec.rules[0].name: Forbidden: Name" ),
1181
1179
conditions .NewRouteUnsupportedValue (
1182
1180
"All rules are invalid: [spec.rules[0].matches[0].method.service: Required value: service is required, " +
1183
1181
"spec.rules[0].matches[0].method.method: Required value: method is required]" ,
@@ -1573,8 +1571,7 @@ func TestProcessGRPCRouteRules_UnsupportedFields(t *testing.T) {
1573
1571
},
1574
1572
expectedValid : true ,
1575
1573
expectedConds : []conditions.Condition {
1576
- conditions .NewRouteUnsupportedField ("There are rules with unsupported fields configurations: spec.rules[0].name: " +
1577
- "Forbidden: rule names are not supported" ),
1574
+ conditions .NewRouteUnsupportedField ("spec.rules[0].name: Forbidden: Name" ),
1578
1575
},
1579
1576
expectedWarns : 1 ,
1580
1577
},
@@ -1590,9 +1587,8 @@ func TestProcessGRPCRouteRules_UnsupportedFields(t *testing.T) {
1590
1587
},
1591
1588
expectedValid : true ,
1592
1589
expectedConds : []conditions.Condition {
1593
- conditions .NewRouteUnsupportedField ("There are rules with unsupported fields configurations: " +
1594
- "[spec.rules[0].name: Forbidden: rule names are not supported, " +
1595
- "spec.rules[0].sessionPersistence: Forbidden: sessionPersistence is not supported]" ),
1590
+ conditions .NewRouteUnsupportedField ("[spec.rules[0].name: Forbidden: Name, " +
1591
+ "spec.rules[0].sessionPersistence: Forbidden: SessionPersistence]" ),
1596
1592
},
1597
1593
expectedWarns : 2 ,
1598
1594
},
0 commit comments