quarkus
quarkus copied to clipboard
quarkus.keycloak.devservices.realm-path option is ignored if used in test/resources/application.properties
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
/cc @geoand, @pedroigor, @sberyozkin, @stuartwdouglas
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.