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

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

Open
metteo opened this issue Feb 12, 2024 · 1 comment
Labels
bug Indicates an unexpected problem or unintended behavior smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear

Comments

@metteo
Copy link

metteo commented Feb 12, 2024

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 metteo changed the title Does matchPath(regexPath, examplePath) makes the mock server expect request with examplePath (exact match?) Does matchPath(regexPath, examplePath) makes the mock server expect request with examplePath (exact match)? Feb 12, 2024
@rholshausen rholshausen added bug Indicates an unexpected problem or unintended behavior smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear labels Feb 14, 2024
Copy link

🤖 Great news! We've labeled this issue as smartbear-supported and created a tracking ticket in PactFlow's Jira (PACT-1827). We'll keep work public and post updates here. Meanwhile, feel free to check out our docs. Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear
Projects
None yet
Development

No branches or pull requests

2 participants