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

conformance: Add additional path matching edge cases #1627

Conversation

sunjayBhatia
Copy link
Member

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

Adds some test cases (from Contour e2e tests) for edge cases in path matching.

In consolidating this set of test cases: https://github.com/projectcontour/contour/blob/76521b7dbc562815083ec207abef686bc02614ce/test/e2e/gateway/path_condition_match_test.go#L69-L84

We found we can eliminate all but a few that do not have overlap with the upstream conformance tests, so added tests for the following cases:

  • trailing slash on path prefix should match
  • path prefixes are path segment matches not string prefix matches
  • test to ensure a path containing the prefix is not matched

Which issue(s) this PR fixes:
N/A

Does this PR introduce a user-facing change?:

NONE

- trailing slash on path prefix should match
- path prefixes are path segment matches not string prefix matches
- test to ensure a path containing the prefix is not matched

Signed-off-by: Sunjay Bhatia <[email protected]>
@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 5, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 5, 2023
@robscott
Copy link
Member

robscott commented Jan 6, 2023

Great additions, thanks @sunjayBhatia!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 6, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: robscott, skriss, sunjayBhatia

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 6, 2023
@k8s-ci-robot k8s-ci-robot merged commit 69b5abb into kubernetes-sigs:main Jan 6, 2023
@sunjayBhatia sunjayBhatia deleted the conformance-additional-path-matching-cases branch January 6, 2023 18:29
@shaneutt shaneutt added this to the v0.6.1 milestone Feb 7, 2023
shaneutt pushed a commit that referenced this pull request Feb 7, 2023
…h-matching-cases

conformance: Add additional path matching edge cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants