Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 17, 2025

WireMock's urlMatching is intended for matching entire URLs including query parameters, while urlPathEqualTo matches only the path component. The codebase should consistently use urlPathEqualTo for path-only matching as established in #4378.

Changes

  • Removed unused urlMatching import from KubernetesInformerCreatorTest.java
  • All 298 WireMock test assertions already use urlPathEqualTo correctly; this was the only remaining reference
-import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
Original prompt

This section details on the original issue you should resolve

<issue_title>Substitute urlPathEqualTo for urlMatching</issue_title>
<issue_description>urlMatching is intended to match the entire URL including query parameters, whereas we are using it in tests just for the Path.

#4378

Fix this for some tests, but there are recurring instances of this throughout the codebase. We should replicate this fix throughout all of our unit tests that use WireMock.</issue_description>

<agent_instructions>Please update unit tests to replace urlMatching with urlPathEqualTo similar to what was done in this PR #4378</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 17, 2025
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unit tests to replace urlMatching with urlPathEqualTo Remove unused urlMatching import from WireMock tests Nov 17, 2025
Copilot finished work on behalf of brendandburns November 17, 2025 21:44
Copilot AI requested a review from brendandburns November 17, 2025 21:44
@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2025
@brendandburns brendandburns removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 17, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, Copilot

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

@brendandburns brendandburns marked this pull request as ready for review November 18, 2025 17:51
@k8s-ci-robot k8s-ci-robot merged commit ac26aa5 into master Nov 18, 2025
33 checks passed
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Substitute urlPathEqualTo for urlMatching

3 participants