-
Notifications
You must be signed in to change notification settings - Fork 526
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
conformance: add test for optional address value #3689
base: main
Are you sure you want to change the base?
conformance: add test for optional address value #3689
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: EyalPazz The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @EyalPazz. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-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.
Thanks for this PR, @EyalPazz.
I am having hard time to figure out the context of this test and what we want to achieve here. There is no description in the PR and in the linked issue either. Do you mind adding context about what we are testing and what's the expected behavior?
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.
Have you run this test against any implementation, @EyalPazz?
81191c7
to
748a98b
Compare
Yea I have tested this against istio, obviously it isn't going through because it isn't implementing the feature, but when i remove the feature requirement it fails with |
|
||
// This is being done in order to support the injection of implementation-specific address types | ||
// into the test suite | ||
if len(gwspec.Addresses) > 0 && *gwspec.Addresses[0].Type == "PLACEHOLDER_ADDRESS_TYPE" { |
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.
Instead of hardcoding the PLACEHOLDER index to 0, can we look up for it? This would make this code future-proof and more robust.
err := s.Client.Get(ctx, gwNN, currentGW) | ||
require.NoError(t, err, "error getting Gateway: %v", err) | ||
t.Logf("verifying that the Gateway %s/%s is accepted", gwNN.Namespace, gwNN.Name) | ||
kubernetes.GatewayMustHaveCondition(t, s.Client, s.TimeoutConfig, gwNN, metav1.Condition{ |
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.
The spec says
// When a value is unspecified, an implementation SHOULD automatically
// assign an address matching the requested type if possible.
Shouldn't we check that the address gets properly assigned by checking GatewayStatusAddress
?
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.
it will produce the same results imo but good idea! will do
if address.Type != nil && (*address.Type == gatewayv1.IPAddressType || *address.Type == v1alpha2.HostnameAddressType) { | ||
if address.Type != nil { |
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.
@mlavacca regarding this line, do you think it's an OK change? i didn't really understand why it was like at first place
33b8203
to
ecc2dd8
Compare
/kind test
/area conformance
Fixes #3687