File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -524,12 +524,12 @@ func validatePathMatch(
524524 }
525525
526526 if * path .Type != v1beta1 .PathMatchPathPrefix {
527- valErr := field .NotSupported (fieldPath , * path .Type , []string {string (v1beta1 .PathMatchPathPrefix )})
527+ valErr := field .NotSupported (fieldPath . Child ( "type" ) , * path .Type , []string {string (v1beta1 .PathMatchPathPrefix )})
528528 allErrs = append (allErrs , valErr )
529529 }
530530
531531 if err := validator .ValidatePathInPrefixMatch (* path .Value ); err != nil {
532- valErr := field .Invalid (fieldPath , * path .Value , err .Error ())
532+ valErr := field .Invalid (fieldPath . Child ( "value" ) , * path .Value , err .Error ())
533533 allErrs = append (allErrs , valErr )
534534 }
535535
Original file line number Diff line number Diff line change @@ -520,7 +520,7 @@ func TestBuildRoute(t *testing.T) {
520520 },
521521 Conditions : []conditions.Condition {
522522 conditions .NewRouteUnsupportedValue (
523- `All rules are invalid: spec.rules[0].matches[0].path: Invalid value: "/invalid": invalid path` ,
523+ `All rules are invalid: spec.rules[0].matches[0].path.value : Invalid value: "/invalid": invalid path` ,
524524 ),
525525 },
526526 Rules : []Rule {
@@ -581,7 +581,7 @@ func TestBuildRoute(t *testing.T) {
581581 Conditions : []conditions.Condition {
582582 conditions .NewTODO (
583583 `Some rules are invalid: ` +
584- `[spec.rules[0].matches[0].path: Invalid value: "/invalid": invalid path, ` +
584+ `[spec.rules[0].matches[0].path.value : Invalid value: "/invalid": invalid path, ` +
585585 `spec.rules[1].filters[0].requestRedirect.hostname: Invalid value: ` +
586586 `"invalid.example.com": invalid hostname]` ,
587587 ),
You can’t perform that action at this time.
0 commit comments