public class YugabyteDBYCQLContainer extends org.testcontainers.containers.GenericContainer<YugabyteDBYCQLContainer>
Supported image: yugabytedb/yugabyte
Exposed ports:
| Constructor and Description |
|---|
YugabyteDBYCQLContainer(org.testcontainers.utility.DockerImageName imageName) |
YugabyteDBYCQLContainer(java.lang.String imageName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure()
Configures the environment variables.
|
protected void |
containerIsStarted(com.github.dockerjava.api.command.InspectContainerResponse containerInfo)
Executes the initilization script
|
java.net.InetSocketAddress |
getContactPoint()
Returns a
InetSocketAddress representation of YCQL's contact point info |
java.lang.String |
getKeyspace()
Keyspace getter method
|
java.util.Set<java.lang.Integer> |
getLivenessCheckPortNumbers() |
java.lang.String |
getLocalDc()
Returns the local datacenter name
|
java.lang.String |
getPassword()
Password getter method
|
java.lang.String |
getUsername()
Username getter method
|
YugabyteDBYCQLContainer |
withInitScript(java.lang.String initScript) |
YugabyteDBYCQLContainer |
withKeyspaceName(java.lang.String keyspace)
Setting this would create the keyspace
|
YugabyteDBYCQLContainer |
withPassword(java.lang.String password)
Setting this along with
withUsername(String) would enable authentication |
YugabyteDBYCQLContainer |
withUsername(java.lang.String username)
Setting this would create the custom user role
|
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, apply, canBeReused, containerIsCreated, containerIsStarted, containerIsStarting, 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, 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, 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 YugabyteDBYCQLContainer(java.lang.String imageName)
imageName - image namepublic YugabyteDBYCQLContainer(org.testcontainers.utility.DockerImageName imageName)
imageName - image namepublic java.util.Set<java.lang.Integer> getLivenessCheckPortNumbers()
getLivenessCheckPortNumbers in interface org.testcontainers.containers.wait.strategy.WaitStrategyTargetgetLivenessCheckPortNumbers in class org.testcontainers.containers.GenericContainer<YugabyteDBYCQLContainer>protected void configure()
withKeyspaceName(String),
withUsername(String), withPassword(String) these parameters will
initilaize the database with those custom valuesconfigure in class org.testcontainers.containers.GenericContainer<YugabyteDBYCQLContainer>public YugabyteDBYCQLContainer withInitScript(java.lang.String initScript)
initScript - path of the initialization script fileYugabyteDBYCQLContainer instancepublic YugabyteDBYCQLContainer withKeyspaceName(java.lang.String keyspace)
keyspace - keyspaceYugabyteDBYCQLContainer instancepublic YugabyteDBYCQLContainer withUsername(java.lang.String username)
username - user nameYugabyteDBYCQLContainer instancepublic YugabyteDBYCQLContainer withPassword(java.lang.String password)
withUsername(String) would enable authenticationpassword - passwordYugabyteDBYCQLContainer instanceprotected void containerIsStarted(com.github.dockerjava.api.command.InspectContainerResponse containerInfo)
containerIsStarted in class org.testcontainers.containers.GenericContainer<YugabyteDBYCQLContainer>containerInfo - containerInfopublic java.net.InetSocketAddress getContactPoint()
InetSocketAddress representation of YCQL's contact point infopublic java.lang.String getLocalDc()
public java.lang.String getUsername()
public java.lang.String getPassword()
public java.lang.String getKeyspace()