To run unit tests in IntelliJ IDEA, you need to have the Kotest plugin installed.
Integration tests use Testcontainers to start a PostgreSQL container. To run the tests, you need to have Docker installed on your machine. Recommended docker application: https://rancherdesktop.io/
Download and install Rancher Desktop from https://rancherdesktop.io/
- For Windows users: You may have to manually add the rancher-desktop kubernetes context to the kubectl configuration.
You can find the configuration file at
C:\Users\<username>\.kube\config
. - For Mac users: You may have to manually add the binaries to PATH. To do this, run the following command:
export PATH=$PATH:/Applications/Rancher\ Desktop.app/Contents/Resources/kubectl
- For Mac users: If you can't run tests due to "Could not find a valid docker environment" error, you may need to run
the following command (
ref https://stackoverflow.com/questions/61108655/test-container-test-cases-are-failing-due-to-could-not-find-a-valid-docker-envi):
sudo ln -s $HOME/.rd/docker.sock /var/run/docker.sock
For further reference, please consider the following sections:
- Official Gradle documentation
- Spring Boot Gradle Plugin Reference Guide
- Create an OCI image
- Flyway Migration
- Spring for Apache Kafka
These additional references should also help you: