Skip to content
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

Add a test case on input contract validation #3315

Merged
merged 4 commits into from
Feb 7, 2025
Merged

Conversation

Pushpalanka
Copy link
Collaborator

@Pushpalanka Pushpalanka commented Nov 20, 2024

Confirm the included cases of envoy input format included in Skipper.

HTTP2 headers are not supported yet.
Also below items are not supported though available in the envoy input format.

input.attributes.request.http.protocol == "HTTP/1.1" input.attributes.destination.address.socketAddress.address == "10.25.95.68" input.attributes.destination.address.socketAddress.portValue == 8000 input.attributes.source.address.socketAddress.address == "10.25.95.69" input.attributes.source.address.socketAddress.portValue == 33772 input.attributes.request.http.headers[":authority"] == "example-app"

@Pushpalanka Pushpalanka added the minor no risk changes, for example new filters label Nov 20, 2024
@Pushpalanka Pushpalanka marked this pull request as ready for review November 20, 2024 16:25
@Pushpalanka Pushpalanka marked this pull request as draft December 6, 2024 15:30
@Pushpalanka Pushpalanka requested review from mjungsbluth and removed request for mjungsbluth December 6, 2024 15:31
@Pushpalanka Pushpalanka marked this pull request as ready for review January 8, 2025 12:20
@wisinghe
Copy link
Collaborator

👍

Comment on lines 724 to 728
for name, values := range ti.removeHeaders {
for _, value := range values {
req.Header.Add(name, value) //adding the headers to validate removal.
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be unused by the test cases. Lets remove all unused testcase fields and introduce them later along with testcases that utilize them.

Comment on lines +729 to +753
for name, values := range ti.requestHeaders {
for _, value := range values {
req.Header.Add(name, value)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can simply assign here like req.Header = ti.requestHeaders

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to not do this as it internally initiated with default values—including the "User-Agent: Go-http-client/1.1" header leading to some hidden side effects.

Signed-off-by: Pushpalanka Jayawardhana <[email protected]>
Signed-off-by: Pushpalanka Jayawardhana <[email protected]>
Signed-off-by: Pushpalanka Jayawardhana <[email protected]>
Signed-off-by: Pushpalanka Jayawardhana <[email protected]>
@AlexanderYastrebov
Copy link
Member

👍

1 similar comment
@Pushpalanka
Copy link
Collaborator Author

👍

@Pushpalanka Pushpalanka merged commit fbf7a64 into master Feb 7, 2025
14 checks passed
@Pushpalanka Pushpalanka deleted the input-contract branch February 7, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor no risk changes, for example new filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants