JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
PactBroker can send list of consumer tags ${pactbroker.consumerVersionTags} in a webhook call to trigger provider tests. As described in docs it's a list of tags separated with comma and space (,).
Unfortunately, on the pact-jvm provider tests side ExpressionParser.kt splits the property pactbroker.consumerversionselectors.tags by comma only - javadocs.
The resulting list of tags has the first tag correct, but the latter ones have a space prepended. For example tags dev, prod sent from pact broker is split into dev and prod. Later then, pact provider tests try to query PactBroker for space prepended _prod tag, which does not exist in PactBroker.
To work around that, I am replacing , with , before passing string of tags to pact-jvm provider test.
I think changing ExpressionParser.kt to split by something like ,\s? would fix the problem.
PactBroker can send list of consumer tags
${pactbroker.consumerVersionTags}
in a webhook call to trigger provider tests. As described in docs it's a list of tags separated with comma and space (,
). Unfortunately, on the pact-jvm provider tests side ExpressionParser.kt splits the propertypactbroker.consumerversionselectors.tags
by comma only - javadocs.The resulting list of tags has the first tag correct, but the latter ones have a space prepended. For example tags
dev, prod
sent from pact broker is split intodev
andprod
. Later then, pact provider tests try to query PactBroker for space prepended_prod
tag, which does not exist in PactBroker.To work around that, I am replacing
,
with,
before passing string of tags to pact-jvm provider test.I think changing ExpressionParser.kt to split by something like
,\s?
would fix the problem.