-
Notifications
You must be signed in to change notification settings - Fork 216
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
Skipping verification of certain interactions or provider states (mark tests as pending) #115
Comments
It's something that has been discussed, but never implemented because we On 7 Oct 2016 3:14 PM, "argos83" notifications@github.com wrote:
|
Thanks @bethesque, I've workarounded it for now. I guess that, by "safe" you mean a way in which the state doesn't get skipped forever and ever without nobody noticing it, even when the provider has already implemented what was missing. In that case I understand is not a trivial to make it safe. I though of using RSpec's pending with block, and don't skip the validation but run it in that block, so it will start failing when the provider's api endpoint is fixed/implemented (so the 'pending' can be removed), but if the provider implementation is wrong and breaks the contract it will keep passing and we are back to square one. |
Exactly. You could use the pact broker with tags to solve something like this. If you had a master pact that the CI ran against, and a feature tag which you could push to and then tell your provider team to do the development to support the new interactions when they can. When they've got both the master and the feature pact green, push the feature pact to master. |
@bethesque that explaination/example is nice and really looks like something that would be nice to have in wiki or docs. :) |
I feel like I've written it somewhere before. Let me have a think. |
I've thrown something together here: https://github.com/bethesque/pact_broker/wiki/How-to-add-new-interactions-without-breaking-everything The problem is, the Pact Broker Client needs to be able to tag pacts, and I don't think this dev was ever done, so it's a manual process at the moment. |
Hi!
Is there a way to flag a certain provider state as pending, so it's skipped during verification? For instance, if the set up of that state is tricky or hasn't been implemented yet. Or in my case, I'm using the pact-provider-proxy so I don't have much control of the actual provider state in some cases.
I was not able to find something similar in the docs. I was thinking of something around these lines:
Similarly, a specific interaction could be skipped. (e.g. if the consumer has created tests of a new API endpoint that is not yet implemented in the provider)
The motivation is that you can still run the tests and verify what is implemented works without failing the build because of WIP functionallity.
wdyt?
Thanks!
The text was updated successfully, but these errors were encountered: