public class CouchbaseContainer extends org.testcontainers.containers.GenericContainer<CouchbaseContainer>
Supported image: couchbase/server
Exposed ports:
Note that it does not depend on a specific couchbase SDK, so it can be used with both the Java SDK 2 and 3 as well as the Scala SDK 1 or newer. We recommend using the latest and greatest SDKs for the best experience.
| Constructor and Description |
|---|
CouchbaseContainer()
Deprecated.
use
CouchbaseContainer(DockerImageName) instead |
CouchbaseContainer(org.testcontainers.utility.DockerImageName dockerImageName)
Create a new couchbase container with the specified image name.
|
CouchbaseContainer(java.lang.String dockerImageName)
Creates a new couchbase container with the specified image name.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure() |
protected void |
containerIsStarted(com.github.dockerjava.api.command.InspectContainerResponse containerInfo) |
protected void |
containerIsStarting(com.github.dockerjava.api.command.InspectContainerResponse containerInfo) |
int |
getBootstrapCarrierDirectPort() |
int |
getBootstrapHttpDirectPort() |
java.lang.String |
getConnectionString() |
java.lang.String |
getPassword() |
java.lang.String |
getUsername() |
CouchbaseContainer |
withAnalyticsService()
Enables the analytics service which is not enabled by default.
|
CouchbaseContainer |
withBucket(BucketDefinition bucketDefinition) |
CouchbaseContainer |
withCredentials(java.lang.String username,
java.lang.String password)
Set custom username and password for the admin user.
|
CouchbaseContainer |
withEnabledServices(CouchbaseService... enabled) |
CouchbaseContainer |
withEventingService()
Enables the eventing service which is not enabled by default.
|
CouchbaseContainer |
withServiceQuota(CouchbaseService service,
int quotaMb)
Configures a custom memory quota for a given service.
|
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, apply, canBeReused, containerIsCreated, 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, 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, isRunning@Deprecated public CouchbaseContainer()
CouchbaseContainer(DockerImageName) insteadpublic CouchbaseContainer(java.lang.String dockerImageName)
dockerImageName - the image name that should be used.public CouchbaseContainer(org.testcontainers.utility.DockerImageName dockerImageName)
dockerImageName - the image name that should be used.public CouchbaseContainer withCredentials(java.lang.String username, java.lang.String password)
username - the admin username to use.password - the password for the admin user.CouchbaseContainer for chaining purposes.public CouchbaseContainer withBucket(BucketDefinition bucketDefinition)
public CouchbaseContainer withEnabledServices(CouchbaseService... enabled)
public CouchbaseContainer withServiceQuota(CouchbaseService service, int quotaMb)
service - the service to configure the quota for.quotaMb - the memory quota in MB.CouchbaseContainer for chaining purposes.public CouchbaseContainer withAnalyticsService()
CouchbaseContainer for chaining purposes.public CouchbaseContainer withEventingService()
CouchbaseContainer for chaining purposes.public final java.lang.String getUsername()
public final java.lang.String getPassword()
public int getBootstrapCarrierDirectPort()
public int getBootstrapHttpDirectPort()
public java.lang.String getConnectionString()
protected void configure()
configure in class org.testcontainers.containers.GenericContainer<CouchbaseContainer>protected void containerIsStarting(com.github.dockerjava.api.command.InspectContainerResponse containerInfo)
containerIsStarting in class org.testcontainers.containers.GenericContainer<CouchbaseContainer>protected void containerIsStarted(com.github.dockerjava.api.command.InspectContainerResponse containerInfo)
containerIsStarted in class org.testcontainers.containers.GenericContainer<CouchbaseContainer>