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> environmentVariableProvider
    Used for injecting environment variables into the container.
    java.lang.Class<? extends IHostNameResolver> hostNameResolver
    Used for determining the host name of the machine running the docker containers so that the containers can be addressed.
    boolean ignoreDockerRunErrors
    Determines if errors should be ignored when starting the Docker container.
    java.lang.String imageTag
    Use a specific image tag for docker container
    boolean pullNewImage
    Determines if a new image is pulled from the docker repo before the tests are run.
    boolean randomizePorts
    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
    java.lang.String[] services
    Determines which services should be run when the localstack starts.
    boolean useSingleDockerContainer
    Determines if the singleton container should be used by all test classes
  • Element Details

    • hostNameResolver

      java.lang.Class<? extends IHostNameResolver> hostNameResolver
      Used 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> environmentVariableProvider
      Used 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 pullNewImage
      Determines if a new image is pulled from the docker repo before the tests are run.
      Default:
      false
    • randomizePorts

      boolean randomizePorts
      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
      Default:
      false
    • services

      java.lang.String[] services
      Determines which services should be run when the localstack starts. When empty, all the services available get up and running.
      Default:
      {}
    • imageTag

      java.lang.String imageTag
      Use a specific image tag for docker container
      Default:
      ""
    • useSingleDockerContainer

      boolean useSingleDockerContainer
      Determines if the singleton container should be used by all test classes
      Default:
      false
    • ignoreDockerRunErrors

      boolean ignoreDockerRunErrors
      Determines 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