Skip to content

Instantly share code, notes, and snippets.

@disegmvm
Created May 1, 2023 09:36
Show Gist options
  • Save disegmvm/5da2b9a7251d04916befd8704adc5882 to your computer and use it in GitHub Desktop.
Save disegmvm/5da2b9a7251d04916befd8704adc5882 to your computer and use it in GitHub Desktop.
_, err := pact.VerifyProvider(t, types.VerifyRequest{
ProviderBaseURL: "http://127.0.0.1:8080", //provider's URL
BrokerURL: "https://pen.pactflow.io", //link to your remote Contract broker
BrokerToken: "xxx", //your PactFlow token
PublishVerificationResults: true,
ProviderVersion: "1.0.0",
})
if err != nil {
t.Fatal(err)
}
// Uncomment to verify contract locally
/*log.Println("[debug] start verification")
_, err := pact.VerifyProvider(t, types.VerifyRequest{
ProviderBaseURL: "http://127.0.0.1:8080",
PactURLs: []string{"../client/pacts/sample_consumer-sample_provider.json"},
})
if err != nil {
t.Fatal(err)
}*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment