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 IBindMountProvider>bindMountProviderUsed for injecting directories or files that are bind mounted into the docker container.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.StringimageNameUse a specific image name (consisting of organisation and repository, e.g.java.lang.StringimageTagUse a specific image tag for docker containerjava.lang.StringinitializationTokenA Java Regex that is used to wait for the execution of custom init scriptsjava.lang.StringportEdgePort number for the edge service, the main entry point for all API invocations.java.lang.StringportElasticSearchPort number for the elasticsearch service.booleanpullNewImageDetermines if a new image is pulled from the docker repo before the tests are run.booleanrandomizePortsDeprecated.java.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
-
bindMountProvider
java.lang.Class<? extends IBindMountProvider> bindMountProviderUsed for injecting directories or files that are bind mounted into the docker container. Implement a class that provides a map of host to container directory or file mappings, with host directories/files as keys and container directories/files as values. Remember that Docker needs absolute paths for host directories and files.- Default:
- cloud.localstack.docker.annotation.IBindMountProvider.EmptyBindMountProvider.class
-
initializationToken
java.lang.String initializationTokenA Java Regex that is used to wait for the execution of custom init scripts- Default:
- ""
-
pullNewImage
boolean pullNewImageDetermines if a new image is pulled from the docker repo before the tests are run.- Default:
- false
-
randomizePorts
@Deprecated boolean randomizePortsDeprecated.Determines 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. Deprecated, since latest LocalStack is using a single entry point (edge service)- 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.- See Also:
ServiceName
- Default:
- {}
-
imageName
java.lang.String imageNameUse a specific image name (consisting of organisation and repository, e.g. localstack/localstack-full for docker container- Default:
- ""
-
imageTag
java.lang.String imageTagUse a specific image tag for docker container- Default:
- ""
-
portEdge
java.lang.String portEdgePort number for the edge service, the main entry point for all API invocations. Alternatively, use the LOCALSTACK_EDGE_PORT environment variable.- Default:
- "4566"
-
portElasticSearch
java.lang.String portElasticSearchPort number for the elasticsearch service. Alternatively, use the LOCALSTACK_ELASTICSEARCH_PORT environment variable.- Default:
- "4571"
-
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
-