Skip to content
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

VerifyProvider returns inconsistent verification responses #169

Closed
bbmokus opened this issue Jul 2, 2021 · 2 comments
Closed

VerifyProvider returns inconsistent verification responses #169

bbmokus opened this issue Jul 2, 2021 · 2 comments

Comments

@bbmokus
Copy link

bbmokus commented Jul 2, 2021

Software versions

  • OS: linux
  • Consumer Pact library: Pact go v1.5.2
  • Provider Pact library: Pact go v1.5.2
  • Golang Version: go1.15.2

Expected behaviour

When verifying a provider with multiple pacts, the ProviderVerifierResponse array should contain an entry for each pact verification with the correct results.

Actual behaviour

All ProviderVerifierResponse objects contain the data of the last verification result, thus we get an inconsistent result.

Steps to reproduce

Call verify provider with two pact files:

verifierResponses, err := pact.VerifyProvider(t, types.VerifyRequest{
  PactURLs: []string{"./pact1.json", "./pact2.json"},
  // ...
})

The response array contains two entries, but unfortunately the example entries in the first result (verifierResponses[0].Examples) are overwritten by the second result.

@mefellows
Copy link
Member

Thanks for the report. I'll aim to take a look next week.

FYI in case you're up for it, we have a beta of the next major release out (see https://github.com/pact-foundation/pact-go/tree/2.x.x/). It's getting close to API stable, and I plan to release it as the next major version in the next month or 2.

@bbmokus
Copy link
Author

bbmokus commented Jul 5, 2021

Thanks for the merge and creating the new version!

Good to know about the next major release, I will check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants