Skip to content

Instantly share code, notes, and snippets.

@disegmvm
Created May 1, 2023 09:31
Show Gist options
  • Save disegmvm/ca1c3f9e4f684611e4038353fcda3fbb to your computer and use it in GitHub Desktop.
Save disegmvm/ca1c3f9e4f684611e4038353fcda3fbb to your computer and use it in GitHub Desktop.
publisher := dsl.Publisher{}
err := publisher.Publish(types.PublishRequest{
PactURLs: []string{"../client/pacts/sample_consumer-sample_provider.json"},
PactBroker: "https://pen.pactflow.io/", //link to your remote Contract broker
BrokerToken: "xxx", //your PactFlow token
ConsumerVersion: "1.0.0",
Tags: []string{"1.0.0", "latest"},
})
if err != nil {
t.Fatal(err)
}
// Uncomment to verify contract locally
/*err := pact.Verify(postCar)
if err != nil {
t.Fatalf("Error on Verify: %v", err)
}*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment