Hello, We are implementing bi-directional testing ...
# general
o
Hello, We are implementing bi-directional testing in some of our projects, but it's not clear to us how the contract matching is done between consumer versions, provider versions, and different environments. For example, is the environment matching one-to-one (i.e., consumer 'dev' with provider 'dev'), or are they separate? Can a consumer in a 'dev' environment match with a provider in 'production', for instance? And how do we control that? Thank you.
m
Hi!
but it’s not clear to us how the contract matching is done between consumer versions, provider versions, and different environments.
By default, we match against the latest version, and any deployed or released version of the reciprocal of the integration. e.g. If you publish version
abc123
of application
A
(in an
A
->
B
relationship) Further, if the latest version of
B
is
xyz098
, and version
abab2323
is deployed to
staging
and version
baba6565
is deployed to
prod
, then we check if
abc123
is compatible with: 1. The most recent version of
B
(
xyz098
) 2. All deployed/released versions a.
abab2323
(staging) b.
baba6565
(prod) And vice versa. When you call
can-i-deploy
for version that doesn’t have a compatibily matrix entry, we perform a comparison on demand. Use the polling arguments to wait for a result (usually a few seconds).