Experiments to get Gorm working in tests with Testcontainers
./gradlew test
The test is using Testcontainers, where part of the configuration is in the test itself (jdbc url etc.)
and part is in the application-test.yml
file.
On the solution branch, there is a solution, but it seems clumsy. Creating a class which implements
ApplicationEventListener<ServerStartupEvent>
that creates a HibernateDatastore if the environment is TEST.
-
Workshop by Álvaro Sánchez-Mariscal: https://github.com/alvarosanchez/micronaut-workshop
-
Micronaut framework: https://micronaut.io
-
Thanks to James Kleeh on the Gitter Channel for tips on configuration