-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validator: ensure no network backend path #2719
Conversation
dataclients/kubernetes/definitions/testdata/validation/route-with-invalid-backend-with-path.log
Outdated
Show resolved
Hide resolved
Signed-off-by: Mustafa Abdelrahman <[email protected]>
2ada4c9
to
f0483b1
Compare
dataclients/kubernetes/definitions/testdata/errorwrapdata/errors.log
Outdated
Show resolved
Hide resolved
dataclients/kubernetes/definitions/testdata/validation/route-with-invalid-backend-with-path.log
Outdated
Show resolved
Hide resolved
dataclients/kubernetes/definitions/testdata/validation/route-with-multiple-filters-one-item.log
Outdated
Show resolved
Hide resolved
dataclients/kubernetes/definitions/testdata/validation/route-with-multiple-filters-one-item.log
Outdated
Show resolved
Hide resolved
Signed-off-by: Mustafa Abdelrahman <[email protected]>
@@ -1 +1 @@ | |||
single filter expected | |||
single filter expected at \\\"foo\(42\) -> bar\(24\)\\\" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the change but makes this test case more robust.
@@ -1 +1 @@ | |||
single predicate expected | |||
single predicate expected at \\\"Foo\(\\\\\\"X-Bar\\\\\\", \\\\\\"42\\\\\\"\) && Bar\(\\\\\\"X-Foo\\\\\\", \\\\\\"24\\\\\\"\)\\\" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the change but makes this test case more robust.
👍 |
Signed-off-by: Mustafa Abdelrahman <[email protected]>
Signed-off-by: Mustafa Abdelrahman <[email protected]>
Signed-off-by: Mustafa Abdelrahman <[email protected]>
Signed-off-by: Mustafa Abdelrahman <[email protected]>
👍 |
{ | ||
name: "routegroup with invalid backends", | ||
inputFile: "rg-with-invalid-backend-path.json", | ||
message: `backend address \"http://example.com/foo\" contains path or query\nbackend address \"http://example.com/foo/bar\" contains path or query\nbackend address \"http://example.com/foo/\" contains path or query\nbackend address \"/foo\" contains path or query\nbackend address \"http://example.com/\" contains path or query\nbackend address \"example.com/\" contains path or query\nbackend address \"example.com/foo\" contains path or query\nbackend address \"http://example.com?foo=bar\" contains path or query`, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need an essentially copy-pasted test case for the webhook given that it relies on the dataclients Validator that has its own test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If both validators have the same options then no, but maybe webhook has more strict way of validation later. Also this tests webhook response, so the error maybe the same but the response is different.
👍 |
…sure we only validate network backends. Signed-off-by: Mustafa Abdelrahman <[email protected]>
👍 |
👍 |
Validate that network backends doesn't have paths Include query params into validation Include missing scheme, rename functions for consistant naming and ensure we only validate network backends. Signed-off-by: Mustafa Abdelrahman <[email protected]>
Validate that network backends doesn't have paths Include query params into validation Include missing scheme, rename functions for consistant naming and ensure we only validate network backends. Signed-off-by: Mustafa Abdelrahman <[email protected]>
…at in the error message Followup on #2719 Signed-off-by: Alexander Yastrebov <[email protected]>
…at in the error message Followup on #2719 Signed-off-by: Alexander Yastrebov <[email protected]>
…at in the error message (#2778) Followup on #2719 Signed-off-by: Alexander Yastrebov <[email protected]>
Disable address validation to prevent errors for existing RouteGroups. Reverts #2719 Signed-off-by: Alexander Yastrebov <[email protected]>
Disable address validation to prevent errors for existing RouteGroups. Reverts #2719 Signed-off-by: Alexander Yastrebov <[email protected]>
Disable address validation to prevent errors for existing RouteGroups. Reverts #2719 Signed-off-by: Alexander Yastrebov <[email protected]>
…2780) Disable address validation to prevent errors for existing RouteGroups. Reverts #2719 Signed-off-by: Alexander Yastrebov <[email protected]>
Make sure that network backends doesn't include paths.