Class AzuriteContainer

java.lang.Object
org.testcontainers.containers.GenericContainer<AzuriteContainer>
org.testcontainers.azure.AzuriteContainer
All Implemented Interfaces:
AutoCloseable, org.testcontainers.containers.Container<AzuriteContainer>, org.testcontainers.containers.ContainerState, org.testcontainers.containers.traits.LinkableContainer, org.testcontainers.containers.wait.strategy.WaitStrategyTarget, org.testcontainers.lifecycle.Startable

public class AzuriteContainer extends org.testcontainers.containers.GenericContainer<AzuriteContainer>
Testcontainers implementation for Azurite Emulator.

Supported image: mcr.microsoft.com/azure-storage/azurite

Exposed ports:

  • Blob: 10000
  • Queue: 10001
  • Table: 10002
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.testcontainers.containers.Container

    org.testcontainers.containers.Container.ExecResult
  • Field Summary

    Fields inherited from class org.testcontainers.containers.GenericContainer

    CONTAINER_RUNNING_TIMEOUT_SEC, dependencies, dockerClient, INTERNAL_HOST_HOSTNAME, waitStrategy

    Fields inherited from interface org.testcontainers.containers.ContainerState

    STATE_HEALTHY
  • Constructor Summary

    Constructors
    Constructor
    Description
    AzuriteContainer(String dockerImageName)
     
    AzuriteContainer(org.testcontainers.utility.DockerImageName dockerImageName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    Returns the connection string for the default credentials.
    getConnectionString(String accountName, String accountKey)
    Returns the connection string for the account name and key specified.
    withSsl(org.testcontainers.utility.MountableFile pfxCert, String password)
    Configure SSL with a custom certificate and password.
    withSsl(org.testcontainers.utility.MountableFile pemCert, org.testcontainers.utility.MountableFile pemKey)
    Configure SSL with a custom certificate and private key.

    Methods inherited from class org.testcontainers.containers.GenericContainer

    addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, canBeReused, containerIsCreated, containerIsStarted, containerIsStarted, containerIsStarting, containerIsStarting, containerIsStopped, containerIsStopping, copyFileFromContainer, createVolumeDirectory, dependsOn, dependsOn, dependsOn, doStart, equals, getBinds, getCommandParts, getContainerId, getContainerInfo, getContainerName, getCopyToFileContainerPathMap, getCreateContainerCmdModifiers, getDependencies, getDockerClient, getDockerImageName, getEnv, getEnvMap, getExposedPorts, getExtraHosts, getImage, getIpAddress, getLabels, getLinkedContainers, getLivenessCheckPort, getLivenessCheckPortNumbers, getLivenessCheckPorts, getLogConsumers, getNetwork, getNetworkAliases, getNetworkMode, getPortBindings, getShmSize, getStartupAttempts, getStartupCheckStrategy, getTestHostIpAddress, getTmpFsMapping, getVolumesFroms, getWaitStrategy, getWorkingDirectory, hashCode, isHostAccessible, isPrivilegedMode, isShouldBeReused, logger, setBinds, setCommand, setCommand, setCommandParts, setContainerDef, setCopyToFileContainerPathMap, setDockerImageName, setEnv, setExposedPorts, setExtraHosts, setHostAccessible, setImage, setLabels, setLinkedContainers, setLogConsumers, setNetwork, setNetworkAliases, setNetworkMode, setPortBindings, setPrivilegedMode, setShmSize, setStartupAttempts, setStartupCheckStrategy, setTmpFsMapping, setVolumesFroms, setWaitStrategy, setWorkingDirectory, start, stop, toString, waitingFor, waitUntilContainerStarted, withAccessToHost, withClasspathResourceMapping, withClasspathResourceMapping, withCommand, withCommand, withCopyFileToContainer, withCopyToContainer, withCreateContainerCmdModifier, withEnv, withEnv, withExposedPorts, withExtraHost, withFileSystemBind, withImagePullPolicy, withLabel, withLabels, withLogConsumer, withMinimumRunningDuration, withNetwork, withNetworkAliases, withNetworkMode, withPrivilegedMode, withReuse, withSharedMemorySize, withStartupAttempts, withStartupCheckStrategy, withStartupTimeout, withTmpFs, withVolumesFrom, withWorkingDirectory

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.testcontainers.containers.Container

    addFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBind

    Methods inherited from interface org.testcontainers.containers.ContainerState

    copyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, execInContainer, execInContainer, execInContainerWithUser, execInContainerWithUser, getBoundPortNumbers, getContainerIpAddress, getCurrentContainerInfo, getFirstMappedPort, getHost, getLogs, getLogs, getMappedPort, isCreated, isHealthy, isRunning

    Methods inherited from interface org.testcontainers.lifecycle.Startable

    close
  • Constructor Details

    • AzuriteContainer

      public AzuriteContainer(String dockerImageName)
      Parameters:
      dockerImageName - specified docker image name to run
    • AzuriteContainer

      public AzuriteContainer(org.testcontainers.utility.DockerImageName dockerImageName)
      Parameters:
      dockerImageName - specified docker image name to run
  • Method Details

    • withSsl

      public AzuriteContainer withSsl(org.testcontainers.utility.MountableFile pfxCert, String password)
      Configure SSL with a custom certificate and password.
      Parameters:
      pfxCert - The PFX certificate file
      password - The password securing the certificate
      Returns:
      this
    • withSsl

      public AzuriteContainer withSsl(org.testcontainers.utility.MountableFile pemCert, org.testcontainers.utility.MountableFile pemKey)
      Configure SSL with a custom certificate and private key.
      Parameters:
      pemCert - The PEM certificate file
      pemKey - The PEM key file
      Returns:
      this
    • configure

      protected void configure()
      Overrides:
      configure in class org.testcontainers.containers.GenericContainer<AzuriteContainer>
    • getConnectionString

      public String getConnectionString()
      Returns the connection string for the default credentials.
      Returns:
      connection string
    • getConnectionString

      public String getConnectionString(String accountName, String accountKey)
      Returns the connection string for the account name and key specified.
      Parameters:
      accountName - The name of the account
      accountKey - The account key
      Returns:
      connection string