@@ -103,13 +103,19 @@ func TestValidator_Validate(t *testing.T) {
103
103
return p
104
104
}),
105
105
expConditions : []conditions.Condition {
106
- staticConds .NewPolicyInvalid ("[spec.body.timeout: Invalid value: \" invalid\" : \\ d{1,4}(ms|s)? " +
107
- "(e.g. '5ms', or '10s', regex used for validation is 'must contain a number followed by 'ms' or 's''), " +
108
- "spec.keepAlive.time: Invalid value: \" invalid\" : \\ d{1,4}(ms|s)? (e.g. '5ms', or '10s', regex used for " +
109
- "validation is 'must contain a number followed by 'ms' or 's''), spec.keepAlive.timeout.server: Invalid value: " +
110
- "\" invalid\" : \\ d{1,4}(ms|s)? (e.g. '5ms', or '10s', regex used for validation is 'must contain a number " +
111
- "followed by 'ms' or 's''), spec.keepAlive.timeout.header: Invalid value: \" invalid\" : \\ d{1,4}(ms|s)? " +
112
- "(e.g. '5ms', or '10s', regex used for validation is 'must contain a number followed by 'ms' or 's'')]" ),
106
+ staticConds .NewPolicyInvalid (
107
+ "[spec.body.timeout: Invalid value: \" invalid\" : ^[0-9]{1,4}(ms|s|m|h)? " +
108
+ "(e.g. '5ms', or '10s', or '500m', or '1000h', regex used for validation is " +
109
+ "'must contain an, at most, four digit number followed by 'ms', 's', 'm', or 'h''), " +
110
+ "spec.keepAlive.time: Invalid value: \" invalid\" : ^[0-9]{1,4}(ms|s|m|h)? " +
111
+ "(e.g. '5ms', or '10s', or '500m', or '1000h', regex used for validation is " +
112
+ "'must contain an, at most, four digit number followed by 'ms', 's', 'm', or 'h''), " +
113
+ "spec.keepAlive.timeout.server: Invalid value: \" invalid\" : ^[0-9]{1,4}(ms|s|m|h)? " +
114
+ "(e.g. '5ms', or '10s', or '500m', or '1000h', regex used for validation is " +
115
+ "'must contain an, at most, four digit number followed by 'ms', 's', 'm', or 'h''), " +
116
+ "spec.keepAlive.timeout.header: Invalid value: \" invalid\" : ^[0-9]{1,4}(ms|s|m|h)? " +
117
+ "(e.g. '5ms', or '10s', or '500m', or '1000h', regex used for validation is " +
118
+ "'must contain an, at most, four digit number followed by 'ms', 's', 'm', or 'h'')]" ),
113
119
},
114
120
},
115
121
{
0 commit comments