-
Notifications
You must be signed in to change notification settings - Fork 493
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
GatewayUnsupportedRoutabilityMutation test seems unnecessary #2208
Comments
Yeah good catch, I think we should just remove the conformance test. For testing API validation we usually add invalid manifests to |
/assign Looks like there are existing examples there already that have good coverage |
The invalid-examples is there because we have language that disallows creation of gateways with a invalid routability values. For mutations (UPDATE) the GEP has the following requirement
That's why the test was asserting that it's rejected by the webhook or the conditions are set to the appropriate value - since it could be either or. Thus I think the right thing to do is fix the |
I might be wrong, but I think one of the expected conditions of the conformance tests is to run in an environment with the webhook enabled, so I'm not sure an implementation will ever see a routability with a value as written in the test ( |
I agree - I don't know what's the best course of action for the invalid routability fixture string constant. In theory implementations should reject a value they do not support. I picked a constant knowing it would fail the field regexp - I could pick something that passes the regexp but should fail - eg. does the literal |
yeah choosing a routability value that is clearly invalid, e.g. contains the word |
Routability conformance tests were added in #2171 and various issues are being fixed in #2207
The GatewayUnsupportedRoutabilityMutation added in the original PR has some issues and seems unnecessary, or at least has parts of it that are:
gateway-api/conformance/tests/gateway-routability.go
Line 126 in 88bb307
From what I understand, the test updates a Gateway with a routability value that is invalid, specifically invalid in that it does not pass the api field validation. It seems this is just testing the kubebuilder validation annotation?
This error classification also does not encompass field validation errors:
gateway-api/conformance/tests/gateway-routability.go
Line 157 in 88bb307
(the following line is still run and the test fails there)
If we want to keep the test, we could just assert updating the Gateway fails with an invalid routability value, and remove the rest of the test.
The text was updated successfully, but these errors were encountered: