pact-jvm icon indicating copy to clipboard operation
pact-jvm copied to clipboard

Does matchPath(regexPath, examplePath) makes the mock server expect request with examplePath (exact match)?

Open metteo opened this issue 4 months ago • 1 comments

I'm asking because I observed a behavior where modifying the regex to be incompatible with the example didn't fail the test / didn't prevent the matching.

After reading the implementation of the method it seems to me MockServer uses the exact matching with the example path and the regex is just an addition into the pact and as a source of the example if not provided (using Generex).

Would it make sense to validate that the example provided explicitly matches the regex to prevent such situations?

metteo avatar Feb 12 '24 07:02 metteo