This project is a demo project how to use Micronaut Test Resources in a micronaut kotlin project using PostgreSQL.
The sourcecode is heavily inspired by the blogpost Introducing Micronaut Test Resources written by Cédric Champeau.
My development environment is
- Windows 10
- Java 17
- latest gradle
- Docker / Kubernetes provided by Rancher Desktop
- IntelliJ with kotest Plugin
- Ubuntu WSL2 with Java 17 and latest gradle
Starting the tests using the kotest plugin does not work. The PostgreSQL testcontainer is not started.
Running the tests using gradle, either started in IntelliJ or in the CLI, the testcontainer is started and the tests are executed as expected.
Running gradle build
works. The PostgreSQL testcontainer is started, the test is executed as expected.