public class YugabyteDBYSQLContainer extends org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>
Supported image: yugabytedb/yugabyte
Exposed ports:
parameters, urlParameters| Constructor and Description |
|---|
YugabyteDBYSQLContainer(org.testcontainers.utility.DockerImageName imageName) |
YugabyteDBYSQLContainer(java.lang.String imageName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure()
Configures the environment variables.
|
java.lang.String |
getDatabaseName() |
java.lang.String |
getDriverClassName() |
java.lang.String |
getJdbcUrl() |
java.util.Set<java.lang.Integer> |
getLivenessCheckPortNumbers() |
java.lang.String |
getPassword() |
java.lang.String |
getTestQueryString() |
java.lang.String |
getUsername() |
protected void |
waitUntilContainerStarted() |
YugabyteDBYSQLContainer |
withDatabaseName(java.lang.String database)
Setting this would create the keyspace
|
YugabyteDBYSQLContainer |
withPassword(java.lang.String password)
Setting this along with
withUsername(String) would enable authentication |
YugabyteDBYSQLContainer |
withUsername(java.lang.String username)
Setting this would create the custom user role
|
addParameter, constructUrlForConnection, constructUrlParameters, constructUrlParameters, containerIsStarted, createConnection, createConnection, getConnectTimeoutSeconds, getDatabaseDelegate, getJdbcDriverInstance, getStartupTimeoutSeconds, optionallyMapResourceParameterAsVolume, optionallyMapResourceParameterAsVolume, runInitScriptIfRequired, setParameters, withConnectTimeoutSeconds, withInitScript, withStartupTimeoutSeconds, withUrlParamaddEnv, 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, 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, waitgetContainerNameaddFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBindcopyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, execInContainerWithUser, execInContainerWithUser, getBoundPortNumbers, getContainerIpAddress, getCurrentContainerInfo, getFirstMappedPort, getHost, getLogs, getLogs, getMappedPort, isCreated, isHealthy, isRunningpublic YugabyteDBYSQLContainer(java.lang.String imageName)
imageName - image namepublic YugabyteDBYSQLContainer(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<YugabyteDBYSQLContainer>protected void configure()
withDatabaseName(String),
withUsername(String), withPassword(String) these parameters will
initilaize the database with those custom valuesconfigure in class org.testcontainers.containers.GenericContainer<YugabyteDBYSQLContainer>public java.lang.String getDriverClassName()
getDriverClassName in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>public java.lang.String getJdbcUrl()
getJdbcUrl in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>public java.lang.String getDatabaseName()
getDatabaseName in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>public java.lang.String getUsername()
getUsername in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>public java.lang.String getPassword()
getPassword in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>public java.lang.String getTestQueryString()
getTestQueryString in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>public YugabyteDBYSQLContainer withDatabaseName(java.lang.String database)
withDatabaseName in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>database - database nameYugabyteDBYSQLContainer instancepublic YugabyteDBYSQLContainer withUsername(java.lang.String username)
withUsername in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>username - user nameYugabyteDBYSQLContainer instancepublic YugabyteDBYSQLContainer withPassword(java.lang.String password)
withUsername(String) would enable authenticationwithPassword in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>password - passwordYugabyteDBYSQLContainer instanceprotected void waitUntilContainerStarted()
waitUntilContainerStarted in class org.testcontainers.containers.JdbcDatabaseContainer<YugabyteDBYSQLContainer>