-
-
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
payload changed by pact between consumer test and provider test #1210
Comments
This seems like a bug in the core. I'll investigate later and raise an upstream issue if that's the case. It should be treated as a JSON media type. Thanks for the detailed report. |
Thanks a lot, if needed you can reproduce the behavior using this repository https://github.com/ajoanny/pact-issue-1210. |
I think it is bug in Pact JS, as the CLI verifier was correctly returning string data Likely in the proxy. Adding the custom type in there yields a change from:
to
I suspect the proxy is not writing the body back correctly, it may be as a result of #1199, possibly
|
OK, I think the problem is in your express server. At least, the repro can be fixed by changing the
I've tested this on the latest Pact JS and it seems to work OK. The |
It works fine ! Thank you 🙏🏽 🙏🏽 🙏🏽 ! I will fix the code on my server. Have a nice day ! |
No worries! |
Thank you for reporting a bug! We appreciate it very much. Issues are a big input into the priorities for Pact-JS development
All italic text in this template is safe to remove before submitting
Thanks again!
Software versions
Please provide at least OS and version of pact-js
Issue Checklist
Please confirm the following:
Hello !
Expected behaviour
When this request is defined in the consumer test
Then the request body used in the provider test should be
Actual behaviour
The body used in the request for the provider is
Steps to reproduce
Consumer test :
Provider test:
The request handler :
I have a workaround which is to use the content-type 'application/json' to keep the body as it was defined in the consumer test. I dont know if it should be flagged as a bug, but it's really surprising that the request was not exactly the same on both side of participants.
If I have enough time today I'll use the template to create a repository to reproduce the behavior.
Have a nice day 👋🏽 !
Provide a Minimal, Reproducible Example. You can create your own repository, or use this template that's already hooked up to CI and everything.
Relevant log files
consumer-provider.json
provider.log
consumer.log
Please ensure you set logging to
DEBUG
and attach any relevant log files here (or link to a gist).The text was updated successfully, but these errors were encountered: