Simple study about contract tests between consumers and providers using Pact and Pact Broker.
Scenario:
-
There is an
api-in-go
which exposes two endpoints:/users/:id
/items/:sku
-
There is a
frontend-client
that fetches fromapi-in-go
using/users/:id
endpoint -
There is a
ruby-service
that fetches fromapi-in-go
using/item/:sku
endpoint -
There is a
pact-broker
that will receive the contracts published byfrontend-client
andruby-service
, will provide toapi-in-go
so the API can test if the interactions are still valid or not and will show the current integration status