-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Provider verification fails if no consumers exist #105
Comments
Is there any update on this issue? This has recently caught me out. Thanks! |
I don't know how I missed this, sorry! (todo: add stalebot so I don't miss it...). Let me check, the behaviour may have been modified upstream in the verifier. |
FYI it shouldn't cause a failure and has been since fixed in the underlying dependency. I've also added a minor update to the way the error messages are presented in this situation, to make it clearer in cases where it's not understood what's happening. Added flag See fdc6dca. |
Software versions
Expected behaviour
If no consumers have published pacts for a provider the verification should pass. When searching for tags (consumers) that don’t exist yet it might be desirable to skip the provider test, maybe displaying a warning to the console. This is a common scenario when setting up initially or when consumers haven't pushed pacts matching the tag being verified.
Actual behaviour
Pact provider verification fails with “Pact URLs is mandatory” which is a little ambiguous. This is due to the validation in
func (VerifyRequest) Validate () error
Steps to reproduce
Ensure no consumers have published pacts for a given provider. Verify the provider by calling
res, err := pact.VerifyProvider(…)
. Verification failsHappy to submit a PR if the proposed behavior is accepted.
The text was updated successfully, but these errors were encountered: