-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Using fromProviderState should not allow mock server to match any request #1088
Comments
👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-1137). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps. |
Thanks for this report Tien. Might be a tricky one actually, let's see how we go! |
Updated issue's description with latest version of pact-js. The log is now cleaner. Also added explanation to demo project. |
This is still relevant, having the same issue. Posted another question to Slack, as it doesn't show messages from more than 90 days ago. |
I realised this wasn't linked to an upstream issue, I'll re-raise in the core where I believe this belongs. |
Not an upstream issue, the bug is because it's a type matcher and a generator - it should only be a generator. This will require some typing updates. Source of issue was introduced here: 5fdf7eb#diff-884c1c7cbdaafa772a7a428e0ca83ce1fc58f03972dfa0fabcb89106d6ac35f5R409. |
New (possible) upstream issue: pact-foundation/pact-reference#448 |
When I add interaction like this:
I expect mock server should return 404 for this request
GET /any
, but it return 200 with body{"id": "14f6626f-c51e-4311-ac52-182c8f2a7634"}
For more development information, please take a look at this Slack's discussion https://pact-foundation.slack.com/archives/C9VBGLUM9/p1683003726545669
Software versions
Please provide at least OS and version of pact-js
v18.17.1
Issue Checklist
Please confirm the following:
Expected behaviour
The request
GET /any
should return 404, and mock server should reportthe request GET /api/users/14f6626f-c51e-4311-ac52-182c8f2a7634 is expected but not received
.Actual behaviour
The request
GET /any
return 200 with json body that didn't belong to it.Steps to reproduce
Here is the demo project https://github.com/tienvx/test-from-provider-state-generator
Relevant log files
The text was updated successfully, but these errors were encountered: