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

PactBrokerLoader should use contextual ValueResolver to determine whether to fallback to tags #1208

Open
haha02 opened this issue Sep 10, 2020 · 1 comment
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@haha02
Copy link

haha02 commented Sep 10, 2020

Hi team, I found that when using PactVerificationSpringProvider, my pactbroker.consumerversionselectors.tags property setting in the Spring application.yml file is not working. I believe this issue is caused by the implementation of PactBrokerLoader. buildConsumerVersionSelectors:

https://github.com/DiUS/pact-jvm/blob/ec3c777f6626cd6f8c2a09e6194e00d5cf0f9378/provider/src/main/kotlin/au/com/dius/pact/provider/junitsupport/loader/PactBrokerLoader.kt#L113-L117

At line 115, it should pass the resolver to the shouldFallBackToTags() and:

https://github.com/DiUS/pact-jvm/blob/ec3c777f6626cd6f8c2a09e6194e00d5cf0f9378/provider/src/main/kotlin/au/com/dius/pact/provider/junitsupport/loader/PactBrokerLoader.kt#L131-L134

At line 133, it should use the passed-in value resolver to call parseListExpression.

Current implementation will use the default resolver SystemPropertyResolver, which is not consistent with other parseListExpression calls in buildConsumerVersionSelectors.

uglyog pushed a commit that referenced this issue Sep 19, 2020
@uglyog uglyog added the bug Indicates an unexpected problem or unintended behavior label Sep 19, 2020
@uglyog
Copy link
Member

uglyog commented Sep 19, 2020

Thanks for the investigation into the issue

uglyog pushed a commit that referenced this issue Sep 19, 2020
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