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

Quarkus-style configuration of pact location and broker #9

Open
holly-cummins opened this issue Oct 19, 2022 · 2 comments
Open

Quarkus-style configuration of pact location and broker #9

holly-cummins opened this issue Oct 19, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@holly-cummins
Copy link
Contributor

We should make sure things set in application.properties are made available to the tests.

This is related to #3, but different enough that it should get its own issue. The other issue is about enabling dynamic behaviour in the annotation, this is about more general quarkus-friendly config, as we do for many other extensions.

@holly-cummins holly-cummins added the enhancement New feature or request label Oct 19, 2022
@holly-cummins
Copy link
Contributor Author

This should be quite straightforward and perhaps even a no-op (apart from testing), since the broker config can be set by setting the pactbroker.* system properties

  /**
   * @return URL of pact broker
   */
  String url() default "${pactbroker.url:}";

@holly-cummins
Copy link
Contributor Author

I retract my earlier optimism. The Pact classes read directly from the system properties, which means they wouldn't see anything set in application.properties. We may need changes to Pact itself to allow injection of config, or we would need to instrument the annotations to inject our config.

We'd also need to think about precedence if config is set with a system property and in application properties (which Quarkus config may automatically sort out for us), and if it's set in an annotation and in application properties (which Quarkus config would not help with).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant