Skip to content

Commit

Permalink
Merge pull request #11 from pactflow/consumerVersionSelectors
Browse files Browse the repository at this point in the history
Consumer version selectors
  • Loading branch information
YOU54F authored Oct 11, 2023
2 parents 0a8be53 + 7c7ea1c commit 67cff06
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/product/product.pact.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,17 @@ describe("Message provider tests", () => {
const fetchPactsDynamicallyOpts = {
provider: "pactflow-example-provider-js-sns",
// consumerVersionTags: ["master", "prod", "main"], //the old way of specifying which pacts to verify
// consumerVersionSelectors: [{ deployedOrReleased: true } ], // the new way of specifying which pacts to verify
consumerVersionSelectors: [
{ mainBranch: true },
{ deployedOrReleased: true },
{ matchingBranch: true }
], // the new way of specifying which pacts to verify

// Specifying a particular consumer, and the latest pact (non determinstic - used for demonstration!)
consumerVersionSelectors: [{ consumer: 'pactflow-example-consumer-js-sns', latest: true } ],
// consumerVersionSelectors: [{ consumer: 'pactflow-example-consumer-js-sns', latest: true } ],
pactBrokerUrl: process.env.PACT_BROKER_BASE_URL ?? "http://localhost:8000",
enablePending: true,
includeWipPactsSince: '2020-01-01'
};

const opts = {
Expand Down

0 comments on commit 67cff06

Please sign in to comment.