-
Notifications
You must be signed in to change notification settings - Fork 490
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 request header modifier test #1163
conformance: add request header modifier test #1163
Conversation
Hi @skriss. 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/test-infra repository. |
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.
Looks pretty comprehensive to me. A case insensitivity check could be a good addition?
/lgtm
conformance/utils/http/http.go
Outdated
// is expected to arrive at the backend. If | ||
// not specified, it is assumed to be the | ||
// same as the original request. | ||
BackendRequest *Request |
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.
This could have been reversed so that the "make request" code isn't dealing with a struct that includes AbsentHeaders
To do that, ExpectedRequest would embed Request, and adding AbsentHeaders. You'd always supply an ExpectedRequest, and it would be used for making the request if no Request was specified
But ... meh
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.
Agree that this structure would be a bit better if it's not too much trouble.
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.
OK, I can make this change, just noting that this makes all of the struct literals more verbose in the test cases due to the additional nesting (which I think is why I decided against this approach originally), but if it's preferred I'm fine with it.
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.
Will push a commit shortly that I think addresses the essence of this comment while keeping the test case struct literals simple for the normal cases.
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.
Alright, the latest version splits out two structs, Request
and ExpectedRequest
, with the latter embedding the former and adding AbsentHeaders
. Request
is the required one, though, with ExpectedRequest
defaulting to matching Request
if not specified. I think this is the best of both worlds, PTAL.
👍 added the case-insensitivity test case. |
It looks like there's a conflict here, so tests will fail initially, but hopefully this helps post rebase. /ok-to-test |
a609841
to
c6d8e1c
Compare
Thanks @robscott, conflict fixed |
c6d8e1c
to
a057dea
Compare
If possible, it'd be nice to get this merged before the v0.5.0 release. |
a057dea
to
b3a6d37
Compare
I added this in d2990dd |
@robscott just a nudge here, the feedback has been addressed and would be great to have this included in v0.5.0 if possible, thanks! |
LGTM, thank you! |
Sorry it took me so long to get back to this one! Took the time to verify that these tests pass locally for me. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: robscott, skriss The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Looks like this conflicts with #1228. Will LGTM again once this is rebased. |
Signed-off-by: Steve Kriss <krisss@vmware.com>
Signed-off-by: Steve Kriss <krisss@vmware.com>
Signed-off-by: Steve Kriss <krisss@vmware.com>
Signed-off-by: Steve Kriss <krisss@vmware.com>
Signed-off-by: Steve Kriss <krisss@vmware.com>
Signed-off-by: Steve Kriss <krisss@vmware.com>
Signed-off-by: Steve Kriss <krisss@vmware.com>
b3a6d37
to
d896f12
Compare
Rebased and fixed conflict, thanks @robscott! (Also re-validated that this is passing for Contour). |
/lgtm |
Seems like the first one didn't work... /lgtm |
What type of PR is this?
/area conformance
What this PR does / why we need it:
Adds a request header modifier test.
Which issue(s) this PR fixes:
Updates #1103.
Does this PR introduce a user-facing change?: