quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

quarkus.keycloak.devservices.realm-path option is ignored if used in test/resources/application.properties

Open Ultranium opened this issue 2 years ago • 1 comments

Describe the bug

If I set the quarkus.keycloak.devservices.realm-path option in the test/resources/application.properties file, it is ignored by Quarkus. If set in the main/resources/application.properties, then everything works as expected.

Expected behavior

Deploying a Keycloak container initialized with specified realm file.

Actual behavior

Keycloak gets initialized with the default Quarkus realm.

How to Reproduce?

No response

Output of uname -a or ver

Microsoft Windows [Version 10.0.19042.867]

Output of java -version

openjdk version "18.0.2" 2022-07-19

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.11.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 7.5.1

Additional information

No response

Ultranium avatar Aug 09 '22 11:08 Ultranium

/cc @geoand, @pedroigor, @sberyozkin, @stuartwdouglas

quarkus-bot[bot] avatar Aug 09 '22 11:08 quarkus-bot[bot]

OK, now I see what's happening.

There are two Keycloak containers created - one for Quarkus Dev Services, and the second one for running tests (is it the expected behavior though?). So, if the quarkus.keycloak.devservices.realm-path option specified in the test/resources/application.properties file, it only applied to the tests Keycloak container, if specified in the main/resources/application.properties, then both Dev Services and tests Keycloak containers are initialized with the specified realm config.

Ultranium avatar Aug 11 '22 11:08 Ultranium