Class S3MockContainer
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable,org.testcontainers.containers.Container,org.testcontainers.containers.ContainerState,org.testcontainers.containers.traits.LinkableContainer,org.testcontainers.containers.wait.strategy.WaitStrategyTarget,org.testcontainers.lifecycle.Startable
public final class S3MockContainer extends GenericContainer<S3MockContainer>
Testcontainer for S3Mock.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringIMAGE_NAMEprivate final StringhttpEndpointprivate final StringhttpsEndpointprivate final IntegerhttpServerPortprivate final IntegerhttpsServerPortprivate Map<String, String>tmpFsMappingprivate final StringtestHostIpAddressprivate Map<MountableFile, String>copyToFileContainerPathMapprivate final BooleanisShouldBeReusedContainerDefcontainerDefprivate Map<String, LinkableContainer>linkedContainersprivate final Stringlogsprivate final StringipAddressprivate StringdockerImageNameprivate final Map<String, String>envMapprivate List<String>envprivate final StringcontainerIpAddressprivate List<String>extraHostsprivate final StringcontainerIdprivate List<String>networkAliasesprivate StartupCheckStrategystartupCheckStrategyprivate StringworkingDirectoryprivate final Set<Startable>dependenciesprivate List<String>portBindingsprivate LongshmSizeprivate final Stringhostprivate IntegerstartupAttemptsprivate final IntegerfirstMappedPortprivate final BooleanisRunningprivate final InspectContainerResponsecurrentContainerInfoprivate Array<String>commandPartsprivate final Set<CreateContainerCmdModifier>createContainerCmdModifiersprivate BooleanisPrivilegedModeprivate final InspectContainerResponsecontainerInfoprivate List<Integer>exposedPortsprivate Map<String, String>labelsprivate final Set<Integer>livenessCheckPortNumbersprivate WaitStrategywaitStrategyprivate Networknetworkprivate final BooleanisCreatedprivate final StringcontainerNameprivate List<Bind>bindsprivate List<VolumesFrom>volumesFromsprivate RemoteDockerImageimageprivate final List<Integer>boundPortNumbersprivate BooleanisHostAccessibleprivate final DockerClientdockerClientprivate final BooleanisHealthyprivate StringnetworkModeprivate List<Consumer<OutputFrame>>logConsumers
-
Constructor Summary
Constructors Constructor Description S3MockContainer(DockerImageName dockerImageName)S3MockContainer(String tag)Create a S3MockContainer.
-
Method Summary
Modifier and Type Method Description final StringgetHttpEndpoint()final StringgetHttpsEndpoint()final IntegergetHttpServerPort()final IntegergetHttpsServerPort()final S3MockContainerwithRegion(String region)final S3MockContainerwithRetainFilesOnExit(Boolean retainFilesOnExit)final S3MockContainerwithValidKmsKeys(String kmsKeys)final S3MockContainerwithInitialBuckets(String initialBuckets)final S3MockContainerwithVolumeAsRoot(String root)Mount a volume from the host system for the S3Mock to use as the "root". final S3MockContainerwithVolumeAsRoot(Path root)Mount a volume from the host system for the S3Mock to use as the "root". -
Methods inherited from class com.adobe.testing.s3mock.testcontainers.S3MockContainer
getBinds, getCommandParts, getContainerId, getContainerInfo, getContainerName, getCopyToFileContainerPathMap, getCreateContainerCmdModifiers, getDependencies, getDockerClient, getDockerImageName, getEnv, getEnvMap, getExposedPorts, getExtraHosts, getImage, getIpAddress, getLabels, getLinkedContainers, getLivenessCheckPortNumbers, getLogConsumers, getNetwork, getNetworkAliases, getNetworkMode, getPortBindings, getShmSize, getStartupAttempts, getStartupCheckStrategy, getTestHostIpAddress, getTmpFsMapping, getVolumesFroms, getWorkingDirectory, isHostAccessible, isPrivilegedMode, isShouldBeReused, setBinds, setCommandParts, setContainerDef, setCopyToFileContainerPathMap, setDockerImageName, setEnv, setExposedPorts, setExtraHosts, setHostAccessible, setImage, setLabels, setLinkedContainers, setLogConsumers, setNetwork, setNetworkAliases, setNetworkMode, setPortBindings, setPrivilegedMode, setShmSize, setStartupAttempts, setStartupCheckStrategy, setTmpFsMapping, setVolumesFroms, setWaitStrategy, setWorkingDirectory -
Methods inherited from class org.testcontainers.containers.ContainerState
copyFileFromContainer, copyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, execInContainer, execInContainer, execInContainerWithUser, execInContainerWithUser, getBoundPortNumbers, getContainerIpAddress, getCurrentContainerInfo, getFirstMappedPort, getHost, getLogs, getMappedPort, isCreated, isHealthy, isRunning -
Methods inherited from class org.testcontainers.containers.GenericContainer
dependsOn, dependsOn, dependsOn, withAccessToHost, withCreateContainerCmdModifier, withReuse, withSharedMemorySize, withStartupAttempts, withTmpFs -
Methods inherited from class org.testcontainers.lifecycle.Startable
start, stop -
Methods inherited from class org.testcontainers.containers.Container
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFileSystemBind, addLink, followOutput, followOutput, self, setCommand, setCommand, waitingFor, withClasspathResourceMapping, withClasspathResourceMapping, withCommand, withCommand, withCopyFileToContainer, withCopyToContainer, withEnv, withEnv, withEnv, withExposedPorts, withExtraHost, withFileSystemBind, withFileSystemBind, withImagePullPolicy, withLabel, withLabels, withLogConsumer, withMinimumRunningDuration, withNetwork, withNetworkAliases, withNetworkMode, withPrivilegedMode, withStartupCheckStrategy, withStartupTimeout, withVolumesFrom, withWorkingDirectory -
Methods inherited from class java.lang.AutoCloseable
close -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
S3MockContainer
S3MockContainer(DockerImageName dockerImageName)
-
S3MockContainer
S3MockContainer(String tag)
Create a S3MockContainer.
- Parameters:
tag- in the format of "2.1.
-
-
Method Detail
-
getHttpEndpoint
final String getHttpEndpoint()
-
getHttpsEndpoint
final String getHttpsEndpoint()
-
getHttpServerPort
final Integer getHttpServerPort()
-
getHttpsServerPort
final Integer getHttpsServerPort()
-
withRegion
final S3MockContainer withRegion(String region)
-
withRetainFilesOnExit
final S3MockContainer withRetainFilesOnExit(Boolean retainFilesOnExit)
-
withValidKmsKeys
final S3MockContainer withValidKmsKeys(String kmsKeys)
-
withInitialBuckets
final S3MockContainer withInitialBuckets(String initialBuckets)
-
withVolumeAsRoot
final S3MockContainer withVolumeAsRoot(String root)
Mount a volume from the host system for the S3Mock to use as the "root". Docker must be able to read / write into this directory (!)
- Parameters:
root- absolute path in host system
-
withVolumeAsRoot
final S3MockContainer withVolumeAsRoot(Path root)
Mount a volume from the host system for the S3Mock to use as the "root". Docker must be able to read / write into this directory (!)
- Parameters:
root- absolute path in host system
-
-
-
-