public class RedpandaContainer extends org.testcontainers.containers.GenericContainer<RedpandaContainer>
Supported images: docker.redpanda.com/redpandadata/redpanda, docker.redpanda.com/vectorized/redpanda
Exposed ports:
| Constructor and Description |
|---|
RedpandaContainer(org.testcontainers.utility.DockerImageName imageName) |
RedpandaContainer(java.lang.String image) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure() |
protected void |
containerIsStarting(com.github.dockerjava.api.command.InspectContainerResponse containerInfo) |
RedpandaContainer |
enableAuthorization()
Enables authorization.
|
RedpandaContainer |
enableSasl()
Enables SASL.
|
RedpandaContainer |
enableSchemaRegistryHttpBasicAuth()
Enables Http Basic Auth for Schema Registry.
|
java.lang.String |
getAdminAddress()
Returns the admin address.
|
java.lang.String |
getBootstrapServers()
Returns the bootstrap servers address.
|
java.lang.String |
getRestProxyAddress()
Returns the rest proxy address.
|
java.lang.String |
getSchemaRegistryAddress()
Returns the schema registry address.
|
RedpandaContainer |
withListener(java.util.function.Supplier<java.lang.String> listenerSupplier)
Add a
Supplier that will provide a listener with format host:port. |
RedpandaContainer |
withSuperuser(java.lang.String username)
Register username as a superuser.
|
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, apply, canBeReused, containerIsCreated, containerIsStarted, containerIsStarted, containerIsStarting, containerIsStopped, containerIsStopping, copyFileFromContainer, createVolumeDirectory, dependsOn, dependsOn, dependsOn, doStart, equals, failed, finished, 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, setCopyToFileContainerPathMap, setDockerImageName, setEnv, setExposedPorts, setExtraHosts, setHostAccessible, setImage, setLabels, setLinkedContainers, setLogConsumers, setNetwork, setNetworkAliases, setNetworkMode, setPortBindings, setPrivilegedMode, setShmSize, setStartupAttempts, setStartupCheckStrategy, setTmpFsMapping, setVolumesFroms, setWaitStrategy, setWorkingDirectory, start, starting, stop, succeeded, 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, withWorkingDirectoryclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBindcopyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, execInContainerWithUser, execInContainerWithUser, getBoundPortNumbers, getContainerIpAddress, getCurrentContainerInfo, getFirstMappedPort, getHost, getLogs, getLogs, getMappedPort, isCreated, isHealthy, isRunningpublic RedpandaContainer(java.lang.String image)
public RedpandaContainer(org.testcontainers.utility.DockerImageName imageName)
protected void configure()
configure in class org.testcontainers.containers.GenericContainer<RedpandaContainer>protected void containerIsStarting(com.github.dockerjava.api.command.InspectContainerResponse containerInfo)
containerIsStarting in class org.testcontainers.containers.GenericContainer<RedpandaContainer>public java.lang.String getBootstrapServers()
public java.lang.String getSchemaRegistryAddress()
public java.lang.String getAdminAddress()
public java.lang.String getRestProxyAddress()
public RedpandaContainer enableAuthorization()
RedpandaContainer instancepublic RedpandaContainer enableSasl()
RedpandaContainer instancepublic RedpandaContainer enableSchemaRegistryHttpBasicAuth()
RedpandaContainer instancepublic RedpandaContainer withSuperuser(java.lang.String username)
username - username to register as a superuserRedpandaContainer instancepublic RedpandaContainer withListener(java.util.function.Supplier<java.lang.String> listenerSupplier)
Supplier that will provide a listener with format host:port.
Host will be added as a network alias.
The listener will be added to the default listeners.
Default listeners:
Default advertised listeners:
container.getHost():container.getMappedPort(9092)listenerSupplier - a supplier that will provide a listenerRedpandaContainer instance