Hi, is it possible for multiple consumers to share...
# general
f
Hi, is it possible for multiple consumers to share a common contract with the same provider? I mean if they call the same API with the same expectation.
m
No, with Pact each consumer must have its own separate contract with it’s provider. Even if it’s same at one point, what’s stopping it diverging (e.g. during releases, feature dev etc.).
f
Makes sense. Thank you Matt!
m
no probs! Keen to hear how you go with the RPC tooling!
f
Hi Matt I'm very glad you are interested in my rpc tooling! I'm from Amazon and we want to apply pact to our contract testing infrastructure for Smithy RPC V2 protocol. I convert smithy model from the provider response to json, and construct OptionalBody object from json. Then I use compareSynchronousMessage() method do verify it against the pact file.
My next step is to figure out how to generate pact file for rpc consumer. The demo on the pact doc is HTTP so I am trying to find RPC related information. Would you mind giving me some guidance on it? Thank you!
m
Super cool! FYI you might be interested in take a peek at: https://github.com/pact-foundation/roadmap/discussions/122
f
Thank you! I will take a look at it.