You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're running our pact provider tests as a separate (custom) gradle task with separate source sets. The contracts are shared and pulled from a pact-broker using the au.com.dius.pact.provider.junit.loader.PactBroker annotation and the verification result is successfully published to the broker (albeit not if the verification fails - but that's a separate concern). However, the provider version is always set to 0.0.0. In the logs I can see: Set the provider version using the 'pact.provider.version' property. Defaulting to '0.0.0'. But setting this system property seems to have no effect. Neither does setting the pact.verifier.publishResults value to false disable the publish verification step.
Some of the things I have tried:
setting systemProp.pact.provider.version=XXX in gradle.properties
setting systemProperty "pact.provider.version", "XXX" in the task in build.gradle
setting the property as environment variable (both in IntelliJ and directly in cli and both as pact.provider.version and PACT_PROVIDER_VERSION)
running with ./gradlew clean pactProviderTest -Dpact.provider.version=xxx
... and a few other similar approaches. E.g., prefixing the value with au.com.dius.. I've also tried to disable the publish step completely by setting that system prop with no luck so far.
Any ideas are welcome! :)
Setup information:
Gradle version 5.1.1
pact-jvm-provider-junit5_2.12 version 3.5.20
The text was updated successfully, but these errors were encountered:
A lot of people have an issue with this. The tests are run as a separate process, and the system properties are not propagated to the test JVM. You need to use the systemProperty method on the test configuration:
test {
systemProperty 'pact.provider.version', project.version
}
We're running our pact provider tests as a separate (custom) gradle task with separate source sets. The contracts are shared and pulled from a pact-broker using the
au.com.dius.pact.provider.junit.loader.PactBroker
annotation and the verification result is successfully published to the broker (albeit not if the verification fails - but that's a separate concern). However, the provider version is always set to 0.0.0. In the logs I can see:Set the provider version using the 'pact.provider.version' property. Defaulting to '0.0.0'
. But setting this system property seems to have no effect. Neither does setting thepact.verifier.publishResults
value to false disable the publish verification step.Some of the things I have tried:
systemProp.pact.provider.version=XXX
ingradle.properties
systemProperty "pact.provider.version", "XXX"
in the task inbuild.gradle
pact.provider.version
andPACT_PROVIDER_VERSION
)./gradlew clean pactProviderTest -Dpact.provider.version=xxx
... and a few other similar approaches. E.g., prefixing the value with
au.com.dius.
. I've also tried to disable the publish step completely by setting that system prop with no luck so far.Any ideas are welcome! :)
Setup information:
The text was updated successfully, but these errors were encountered: