Hazem Borham
08/04/2022, 3:31 PMHazem Borham
08/04/2022, 3:37 PM_, err := pact.VerifyProvider(t, types.VerifyRequest{
ProviderBaseURL: fmt.Sprintf("<http://127.0.0.1>:%d", port),
PactLogDir: brokerConfig.LogsDir(),
ConsumerVersionSelectors: []types.ConsumerVersionSelector{
types.ConsumerVersionSelector{
MainBranch: true,
},
types.ConsumerVersionSelector{
MatchingBranch: true,
},
types.ConsumerVersionSelector{
DeployedOrReleased: true,
},
},
BrokerURL: brokerConfig.BrokerURL,
BrokerToken: brokerConfig.BrokerAccessToken,
EnablePending: true,
IncludeWIPPactsSince: &includeWipPactsSince,
PublishVerificationResults: allowPublishVerificationResults(),
ProviderBranch: gitInfo.Branch,
ProviderTags: []string{gitInfo.Branch},
ProviderVersion: gitInfo.Version,
StateHandlers: stateHandlers,
})
Hazem Borham
08/04/2022, 3:38 PMBeth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
DEBUG: The pact at <https://test.pactflow.io/pacts/provider/example-provider/consumer/example-consumer/pact-version/011de3a974a121cbf474b931e4de355393b52220> is being verified because the pact content belongs to the consumer versions matching the following criteria:
* latest version from branch 'master' (acda70158a6d338e677a99a19d3fbc9c8371ae90)
* consumer version(s) currently deployed to dev (acda70158a6d338e677a99a19d3fbc9c8371ae90) and prod (acda70158a6d338e677a99a19d3fbc9c8371ae90)
* latest version from the main branch 'master' (acda70158a6d338e677a99a19d3fbc9c8371ae90)
DEBUG: This pact has previously been successfully verified by example-provider. If this verification fails, it will fail the build. Read more at <https://docs.pact.io/go/pending>
Hazem Borham
08/08/2022, 6:57 PMBeth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Hazem Borham
08/08/2022, 11:58 PM<http://github.com/pact-foundation/pact-go|github.com/pact-foundation/pact-go> v1.7.0
Beth (pactflow.io/Pact Broker/pact-ruby)
Matt (pactflow.io / pact-js / pact-go)
t.Logf
function here, they are only printed on test failure or if you pass the -v
flag to the tests.
I could force this to be printed to stdout, but is not a very idiomatic. I’ll have a think about the best way to tackle thisHazem Borham
08/10/2022, 11:24 PM(OBJECT|STRING|INTEGER|FLOAT|BOOLEAN|TIME)
2. Provider verified the pact.
3. Next provider broke the api by changing the enums and added a suffix of _RESULT
and this unintentionally passed the not so great enum matcher, and allowed verification of the pact for the broken api.
Outcome: The consumer's match regex should have been: ^(OBJECT|STRING|INTEGER|FLOAT|BOOLEAN|TIME)$
Beth (pactflow.io/Pact Broker/pact-ruby)
Hazem Borham
08/10/2022, 11:29 PMBeth (pactflow.io/Pact Broker/pact-ruby)
Hazem Borham
08/11/2022, 12:16 AM