Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy in tags separator between PactBroker and pact-jvm provider tests. #1262

Open
wwluk opened this issue Dec 1, 2020 · 1 comment
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@wwluk
Copy link

wwluk commented Dec 1, 2020

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.

@uglyog uglyog added the bug Indicates an unexpected problem or unintended behavior label Dec 12, 2020
@uglyog
Copy link
Member

uglyog commented Dec 13, 2020

4.1.12 released with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants