mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
JmesPathMatcher or and MatchOperator working in version 1.5.34 but not 1.5.35 #545
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PoovenB on GitHub (Aug 28, 2023).
Originally assigned to: @StefH on GitHub.
Describe the bug
When we use version 1.5.35, the
JmesPathMatcherwe're using stops working. Rolling back to version 1.5.34 works again. We're using the following matcher:I have two requests using this matcher with different ids. It could also be that the
MatchOperatorset toandisn't working.Expected behavior:
The
JmesPathMatchershould only return true if the id matches, and theandMatchOperatorshould only return the response for the exact match. I seem to always get back the first request matching the path, instead of the second request which matches the id.Test to reproduce
Other related info
This behaves as expected in version 1.5.34.
@StefH commented on GitHub (Aug 28, 2023):
@PoovenB
I've added two extra unit tests, and both are correct in the 1.5.35 version:
Can you please post your example in more detail?
@PoovenB commented on GitHub (Aug 29, 2023):
Thanks for having a look @StefH! I tried again to be sure, and since version 1.5.34, I get this failed result:
Here's more detail about my setup:
Does anything stand out?
@StefH commented on GitHub (Aug 29, 2023):
should that be this? (with an extra ' at the end?)
@PoovenB commented on GitHub (Aug 30, 2023):
Apologies, that was a typo when I was trying to anonymize the data (I updated in the original comment). I haven't had enough time to look closely at the repo; is there perhaps a unit test example I could follow to try and replicate this in code?
Based on the existing tests, this does not seem to be related to the
JmesPathMatchernor theMatchOperator, so I'm wondering if it's related to the code that's taking in a request and executing the match specifications?@StefH commented on GitHub (Aug 30, 2023):
It would help if you can provide the full request and the mapping.
And you can check this:
https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching-Tips
@VictorioBerra commented on GitHub (Oct 6, 2023):
I too think there is a regression here. Just updated from .30 to .37 and my tests started inexplicably breaking.
My code is very simple too:
URL:
http://localhost:8083/v1/person/workers?showsourcesystem=true&count=700&page=1§ions=personal%2Corganizations%2CemploymentWireMoq result says
WithParam(...)is a score of 0. My app is fixed when I comment outWithParam(...).Possibly a bug with RejectOnMatch?
@StefH commented on GitHub (Oct 6, 2023):
@VictorioBerra
This is indeed an error.
Can you try preview version 1.5.38-ci-17808?
@StefH commented on GitHub (Oct 9, 2023):
@VictorioBerra did you have time yet to verify ?
@VictorioBerra commented on GitHub (Oct 9, 2023):
@StefH Is 1.5.38-ci-17808 published to NuGet?
@StefH commented on GitHub (Oct 9, 2023):
On MyGet
https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
@VictorioBerra commented on GitHub (Oct 9, 2023):
@StefH 1.5.38-ci-17808 fixed it for me, thank you!
@StefH commented on GitHub (Oct 9, 2023):
https://github.com/WireMock-Net/WireMock.Net/pull/1006
@StefH commented on GitHub (Oct 9, 2023):
@VictorioBerra
I'll close this issue and create a new official NuGet in some time