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

Passing Broker URL and Authorization token as Environment Variables #1653

Open qemiller opened 1 year ago

qemiller commented 1 year ago

I am using the pact-jvm to write contract tests and would like to pass the broker URL and auth token as environment variables. I see that System Properties documentation says that these properties can also be set using an OS environment variable but it does not give instructions on how to do this. Any help would be appreciated on this topic.

rholshausen commented 1 year ago

Just set the environment variable as the same name as the JVM system property. I.e. an environment variable pactbroker.url can be used instead of the system property.