I am interested in adding pact-plugins to my broke...
# pact-broker
k
I am interested in adding pact-plugins to my broker server. just copying the pact_plugins to the broker is enough? Does anyone have some steps followed for the broker to run the plugins (especially mockServer capable) ones? it would be great help to interact and learn from you.
šŸ‘‹ 2
y
pact plugins help you with generating and verifying pacts, you can publish those generated pacts to any broker
what exactly are you trying to do
m
Yep. Basically you don't need to add plugins to the broker, they get installed on your client projects where the tests run
Remember - the broker doesn't run any tests. It is the collaboration point and repository for storing them and all of the verification data etc.
k
Yousuf and Matt, given we can’t migrate to pactflow.io, for bi-directional contract testing, we want broker to be the _*intermediary*_ to between the providers and consumers. by having the plugins installed on the broker server, the mock server can be run through Broker ip itself, than local machine fetching the pacts and running locally. Intention is use it for Asynchronous communication. Am I being crazy/stupid here ? :)
m
Am I being crazy/stupid here ? šŸ™‚
Well, I’m not a qualified psychiatrist, so you might want to seek proper medical advice an that one šŸ˜‰
But plugins have nothing to do with the broker, it doesn’t work that way
Pact tests are unit tests, and the mocks always run as part of the unit test where those tests are running (i.e. not remote). That’s just how Pact works
I’m not sure I properly follow your other points, but the Pact Broker is not designed to be a remote mock server.
Have you used Pact before?
k
Matt, I have started recently(3 weeks), but I believe I have some misunderstanding here. Let me re-iterate our use-case clearly 1. we want to use protobuf for our contracts testing. 2. we want the broker to house all the pacts created by our different consumers 3. our providers are similar to open API model, and bi-directional contract testing seems more appropriate for us, than consumer-driven contract testing for needs and suggestion was to rely on pactflow.io saas services 4. given, we have services already using an existing broker server, I am trying to mimic what pactflow.io does in reality with BDCT
m
Right. So plugins currently work with Pact in a consumer-driven model. You could look to create a plugin that mimics BDCT but at the moment the plugin is very much consumer driven. BDCT currently only supports OAS as the provider contract, albeit we would like to extend this to others over time.
given, we have services already using an existing broker server, I am trying to mimic what pactflow.io does in reality with BDCT
what do you mean by ā€œusing an existing broker serverā€ - do you mean the Pact Broker or something else?
k
we have the broker running in a local server Matt.
šŸ‘ 1