Open tubbynl opened 3 years ago
example project;
github-embedded-spring-boot-keycloak-server-39.zip
mvn test
fails
mvn spring-boot:run
works (starts with empty realm, able to login via localhost:8080/auth)
I ran into the same issue and was able to get jUnit 5 tests running by adding the webEnvironment to the @SpringBootTest on my test classes:
@SpringBootTest(classes = MySpringApp.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
This forces the web environment to start with the unit test. That triggers the Undertow server to initialize, which populates the onStartup field of the SpringBootPlatformProvider.
need to investigate, but as for documentation.
embedded-spring-boot-keycloak-server: 3.0.1 (updated from 2.4.0, there this test is green) junit-jupiter:jar:5.7.1