How can more than one consumer point to the same p...
# pact-js
n
How can more than one consumer point to the same provider, meaning how can we have multiple pact verification files on the provider side for different endpoints to point to multiple consumers?
For more clarification: a consumer might have several pact tests each for one endpoint or for different parts of a provider. But they all point to the same provider. So how can the provider differentiate between these consumers and know which provider verification to run for which consumer?
m
Each consumer should refer to the provider by the same name
Then the provider uses selectors to fetch contracts for all of its consumers
If you haven’t already done so, this is recommended for setting up a best practice workflow https://docs.pactflow.io/docs/workshops/ci-cd
(i’d strongly encourage not using the webhookless flow unless you have reasons you can’t use webhooks)
t
So how can the provider differentiate between these consumers and know which provider verification to run for which consumer?
Why would the provider need to do this?
What are you trying to do?