2

I'm developing a Quarkus app with Keycloak for OIDC (OpenID Connect). During development, the app is running at localhost:8080 while Keycloak is running locally as well using Docker.

application.properties:

quarkus.oidc.auth-server-url=http://localhost:8484/auth/realms/my-sso

This is working fine.

Now I want to create some tests. https://quarkus.io/guides/security-openid-connect#wiremock told me to update application.properties as follows:

quarkus.oidc.auth-server-url=${keycloak.url}/auth/realms/my-sso

My question: How do I set that value only for testing. I don't want to keep toggling the values by commenting/uncommenting. If it's dictated by profile, what profiles to use?

wiradikusuma
  • 1,930
  • 4
  • 28
  • 44

1 Answers1

2

Create an application properties file in the test resource folder. Il will be used only for tests:

src/test/resources/application.properties
gaetanc
  • 116
  • 5