Annotation Type LocalstackDockerProperties
@Retention(RUNTIME)
@Target(TYPE)
@Inherited
public @interface LocalstackDockerProperties
An annotation to provide parameters to the main (Docker-based) LocalstackTestRunner
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<? extends IEnvironmentVariableProvider>environmentVariableProviderUsed for injecting environment variables into the container.java.lang.Class<? extends IHostNameResolver>hostNameResolverUsed for determining the host name of the machine running the docker containers so that the containers can be addressed.booleanignoreDockerRunErrorsDetermines if errors should be ignored when starting the Docker container.java.lang.StringimageTagUse a specific image tag for docker containerbooleanpullNewImageDetermines if a new image is pulled from the docker repo before the tests are run.booleanrandomizePortsDetermines if the container should expose the default local stack ports (4567-4583) or if it should expose randomized ports in order to prevent conflicts with other localstack containers running on the same machinejava.lang.String[]servicesDetermines which services should be run when the localstack starts.booleanuseSingleDockerContainerDetermines if the singleton container should be used by all test classes
-
Element Details
-
hostNameResolver
java.lang.Class<? extends IHostNameResolver> hostNameResolverUsed for determining the host name of the machine running the docker containers so that the containers can be addressed.- Default:
- cloud.localstack.docker.annotation.LocalHostNameResolver.class
-
environmentVariableProvider
java.lang.Class<? extends IEnvironmentVariableProvider> environmentVariableProviderUsed for injecting environment variables into the container. Implement a class that provides a map of the environment variables and they will be injected into the container on start-up- Default:
- cloud.localstack.docker.annotation.DefaultEnvironmentVariableProvider.class
-
pullNewImage
boolean pullNewImageDetermines if a new image is pulled from the docker repo before the tests are run.- Default:
- false
-
randomizePorts
boolean randomizePortsDetermines if the container should expose the default local stack ports (4567-4583) or if it should expose randomized ports in order to prevent conflicts with other localstack containers running on the same machine- Default:
- false
-
services
java.lang.String[] servicesDetermines which services should be run when the localstack starts. When empty, all the services available get up and running.- Default:
- {}
-
imageTag
java.lang.String imageTagUse a specific image tag for docker container- Default:
- ""
-
useSingleDockerContainer
boolean useSingleDockerContainerDetermines if the singleton container should be used by all test classes- Default:
- false
-
ignoreDockerRunErrors
boolean ignoreDockerRunErrorsDetermines if errors should be ignored when starting the Docker container. This can be used to run tests with an existing LocalStack container running on the host.- Default:
- false
-