-
Notifications
You must be signed in to change notification settings - Fork 79
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
Multiple Provider Verifier type support #179
Comments
At the moment, you'll need to give your provider a different name (e.g. My understanding is that you can't have both message and http interactions stored in a single contract file. cc: @bethesque - any additional thoughts? |
We definitely want to support this use case. It's just a matter of finding the time. It will take a fair bit of work, because it's not just the publishing, it's also incorporating the results into can-i-deploy. I've raised an issue for it here but I'm not sure when it's going to get to the top of the priority list. |
Hey @mefellows and @bethesque that was a very quick turnaround. Appreciate that. I will try different provider names and see if that resolves our issue. |
Has there been any progress on this or do we still need separate providers for http and event contracts? |
Yes, the progress is that this will be a feature in the v4 specification (see pact-foundation/pact-specification#79). For clarity, it's currently not supported in Pact JS. Once the v3 version is live (which uses the new Rust core), when v4 closes, we can add that fairly quickly, along with plugins and other goodness. |
Closing as the specification now supports this (as above) and this package supports it. It needs to be exposed in Pact JS. |
Software versions
Expected behaviour
The message Pact should only verify contracts for message type consumers contracts and Http REST provider tests should only verify REST call like PACT type consumer contracts.
Actual behaviour
I have a micro service which has REST endpoints as well as it publishes messages when certain event happens.
Hence I have 2 types of Providers in the PACT provider test suite: a MessagePact and a http REST pact; therefore there are 2 *Spec.js files. I am using the PACT broker to verify the providers. The issue I am seeing is when I run all the provider tests together, PACT fails the Message Pact tests while executing the REST provider pacts and vice versa.
My question is is this supported yet? if not is there a way to get around this issue? other than having different broker urls (1 for MessagePact and other for REST).
Steps to reproduce
This is the code snippet for running REST Pact provider verification: (providerPactSpec.js)
And this is the code snippet for MessagePact provider verification (messagePactSpec.js).
Relevant log files
Will provide if needed
I am willing to contribute to help fix this if this is worth fixing.
The text was updated successfully, but these errors were encountered: