Class DocumentDbConfig
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfig<DocumentDbConfig.Builder>
io.floci.testcontainers.config.services.DocumentDbConfig
Configuration for DocumentDB-specific container settings.
Instances are created via DocumentDbConfig.Builder:
DocumentDbConfig config = DocumentDbConfig.builder()
.enabled(true)
.mock(true)
.defaultImage("mongo:8.0")
.dockerNetwork("my-docdb-network")
.build();
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class io.floci.testcontainers.config.services.AbstractServiceConfig
DEFAULT_ENABLED -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEnvVarsToContainer(org.testcontainers.containers.Container<?> container) Applies this service configuration to the given container by setting the appropriate environment variables.static DocumentDbConfig.Builderbuilder()Returns a newDocumentDbConfig.Builderfor this configuration.Returns the default Docker image used for DocumentDB instances.Returns the Docker network used for DocumentDB containers, ornullif not set.booleanisMock()Returns whether DocumentDB clusters are simulated in-memory without real Docker containers.Returns a newDocumentDbConfig.Builderfor this configuration, initialized with the current values of this instance.Methods inherited from class io.floci.testcontainers.config.services.AbstractServiceConfig
applyExposedPortsToContainer, isEnabled
-
Method Details
-
builder
Returns a newDocumentDbConfig.Builderfor this configuration.- Returns:
- a new builder
-
toBuilder
Returns a newDocumentDbConfig.Builderfor this configuration, initialized with the current values of this instance.- Specified by:
toBuilderin classAbstractServiceConfig<DocumentDbConfig.Builder>- Returns:
- a new builder pre-populated with this configuration's values
-
isMock
public boolean isMock()Returns whether DocumentDB clusters are simulated in-memory without real Docker containers.- Returns:
trueif mock mode is enabled
-
getDefaultImage
Returns the default Docker image used for DocumentDB instances.- Returns:
- the image name
-
getDockerNetwork
Returns the Docker network used for DocumentDB containers, ornullif not set.- Returns:
- the Docker network name, or
null
-
applyEnvVarsToContainer
public void applyEnvVarsToContainer(org.testcontainers.containers.Container<?> container) Description copied from class:AbstractServiceConfigApplies this service configuration to the given container by setting the appropriate environment variables.- Overrides:
applyEnvVarsToContainerin classAbstractServiceConfig<DocumentDbConfig.Builder>- Parameters:
container- the container to configure
-