Hello!
My setup
- In my Integration Tests we use testcontainers to provide services to the tests. (LDAP, Databases etc.)
- On the CI runners docker is available on the host.
- In my developer environment - there is no Docker available on the host. (Only in my developer-Vagrant-VM, not visible to test containers)
Problem statement
I am seeking for a possibility
During the development to disable testcontainers, but not the test, if docker is not available.
I would take care of providing the services, usually running in containers
Disabling the testcontainers should happen, depending on the settings in the environment, like ENV variable.
Because right now the only solution I dound is - to comment the @container statements, what gets checked in all the time.
Proposal of a solution
I suggest to introduce a flag at the @org.testcontainers.junit.jupiter.TestContainers annotation:
skipContainersWithoutDocker=true