pact-foundation / pact-jvm

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.
https://docs.pact.io
Apache License 2.0
1.08k stars 479 forks source link

publishResults not able to abstract away in Spring properties file #1294

Open bartboersma opened 3 years ago

bartboersma commented 3 years ago

Hi,

Currently, I am abstracting away pactbroker configuration in a properties.yml file, like this:

pactbroker:
  host: example.pactflow.io
  port: 443
  scheme: https

This works fine and those properties are read by my Pact tests. However, I would like to do the same with pact.verifier.publishResults, but without success. Instead, I need to set it via JVM properties: System.setProperty("pact.verifier.publishResults", "true");.

Expected behaviour When setting pact.verifier.publishResults in my properties file, the test would pick the boolean value up from there.

Actual behaviour When setting pact.verifier.publishResults in my properties file, the value is always false because it is the default.

Same behaviour applies to pact.provider.version.

Regards,

Bart

uglyog commented 3 years ago

Can you test version 4.1.17 to see if it works by setting the value in the Spring context?