localstack / localstack-java-utils

☕ Java utilities and JUnit integration for LocalStack
Apache License 2.0
75 stars 43 forks source link

Allow execution of JUnit tests without access to Docker (in Docker) #74

Open ChrisSamo632 opened 3 years ago

ChrisSamo632 commented 3 years ago

The current JUnit annotation requires a Docker executable to be available for pulling & running the localstack/localstack image.

This tends to work fine on a developer's local machine and possibly in some CI pipelines, however, due to historic insecurities with Docker-in-Docker (DinD), some CI tooling does not permit the running of DinD within pipelines. This prevents the use of LocalStack JUnits within CI pipelines, while other technologies, e.g. Python are fine to use within the same pipelines because they only rely on localstack being present (which can be run as a CI pipeline service) rather than docker itself.

Could a mechanism for skipping the docker pull/run/shutdown for Java tests be provided (e.g. a different annotation or setting in the existing annotation that skips the docker commands and simply expected localstack to be setup and running already)?