Class OracleFreeContainer<SELF extends OracleFreeContainer<SELF>>
java.lang.Object
org.testcontainers.containers.GenericContainer<SELF>
org.testcontainers.containers.JdbcDatabaseContainer<SELF>
com.oracle.spring.testcontainers.OracleFreeContainer<SELF>
- Type Parameters:
SELF- concrete container type
- All Implemented Interfaces:
AutoCloseable, org.testcontainers.containers.Container<SELF>, org.testcontainers.containers.ContainerState, org.testcontainers.containers.traits.LinkableContainer, org.testcontainers.containers.wait.strategy.WaitStrategyTarget, org.testcontainers.lifecycle.Startable
- Direct Known Subclasses:
OracleContainer, TrueCacheContainer
public abstract class OracleFreeContainer<SELF extends OracleFreeContainer<SELF>>
extends org.testcontainers.containers.JdbcDatabaseContainer<SELF>
Common Testcontainers support for the official Oracle AI Database Free image.
This class deliberately contains only image and credential mechanics shared by a primary database and a True Cache instance. Database-specific startup and JDBC policy remains in the concrete containers.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.testcontainers.containers.JdbcDatabaseContainer
org.testcontainers.containers.JdbcDatabaseContainer.NoDriverFoundExceptionNested classes/interfaces inherited from interface org.testcontainers.containers.Container
org.testcontainers.containers.Container.ExecResult -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault pluggable database service name.static final StringDefault administrator password used by the test containers.static final StringDefault container database SID.static final StringOfficial Oracle AI Database Free container image.protected static final Stringstatic final intOracle listener port.Fields inherited from class org.testcontainers.containers.JdbcDatabaseContainer
parameters, urlParametersFields inherited from class org.testcontainers.containers.GenericContainer
CONTAINER_RUNNING_TIMEOUT_SEC, dependencies, dockerClient, INTERNAL_HOST_HOSTNAME, waitStrategyFields inherited from interface org.testcontainers.containers.ContainerState
STATE_HEALTHY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOracleFreeContainer(org.testcontainers.utility.DockerImageName dockerImageName) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidReturns the mapped Oracle listener port.protected Stringprotected final booleanprotected static booleanisValidOracleIdentifier(String value) protected static StringnormalizeOracleIdentifier(String value, String name) protected static voidrequireNotBlank(String value, String name) protected static voidrequireValidPassword(String password) protected static voidrequireValidPassword(String password, String name) protected voidwithAdminPassword(String password) Sets the administrative password passed to the image throughORACLE_PWD.withArchiveLog(boolean enabled) Enables or disables archive logging.withForceLogging(boolean enabled) Enables or disables force logging.withOracleSecrets(OracleContainerSecrets secrets) Supplies the image credentials as files beneath/run/secrets.withPassword(String password) Sets the administrator password used by a container without an application-user mode.Methods inherited from class org.testcontainers.containers.JdbcDatabaseContainer
addParameter, constructUrlForConnection, constructUrlParameters, constructUrlParameters, containerIsStarted, createConnection, createConnection, getConnectTimeoutSeconds, getDatabaseDelegate, getDatabaseName, getJdbcDriverInstance, getJdbcUrl, getStartupTimeoutSeconds, getUsername, optionallyMapResourceParameterAsVolume, optionallyMapResourceParameterAsVolume, runInitScriptIfRequired, setParameters, withConnectTimeoutSeconds, withDatabaseName, withInitScript, withInitScripts, withInitScripts, withStartupTimeoutSeconds, withUrlParam, withUsernameMethods inherited from class org.testcontainers.containers.GenericContainer
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, canBeReused, containerIsCreated, containerIsStarted, containerIsStarting, containerIsStarting, containerIsStopped, containerIsStopping, copyFileFromContainer, createVolumeDirectory, dependsOn, dependsOn, dependsOn, doStart, equals, 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, stop, 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, withWorkingDirectoryMethods inherited from interface org.testcontainers.containers.Container
addFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBindMethods inherited from interface org.testcontainers.containers.ContainerState
copyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, execInContainer, execInContainer, execInContainerWithUser, execInContainerWithUser, getBoundPortNumbers, getContainerIpAddress, getCurrentContainerInfo, getFirstMappedPort, getHost, getLogs, getLogs, getMappedPort, isCreated, isHealthy, isRunningMethods inherited from interface org.testcontainers.containers.traits.LinkableContainer
getContainerNameMethods inherited from interface org.testcontainers.lifecycle.Startable
close
-
Field Details
-
IMAGE_NAME
-
ORACLE_PORT
public static final int ORACLE_PORTOracle listener port.- See Also:
-
DEFAULT_DATABASE_NAME
-
DEFAULT_SID
-
DEFAULT_PASSWORD
Default administrator password used by the test containers.- See Also:
-
ORACLE_PASSWORD_ENV
- See Also:
-
-
Constructor Details
-
OracleFreeContainer
protected OracleFreeContainer(org.testcontainers.utility.DockerImageName dockerImageName)
-
-
Method Details
-
withAdminPassword
-
withPassword
Sets the administrator password used by a container without an application-user mode.- Overrides:
withPasswordin classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends OracleFreeContainer<SELF>>
-
withOracleSecrets
Supplies the image credentials as files beneath/run/secrets.This is Docker-API portable equivalent of the documented Podman secret names. The password is not added to the container environment. Keep the supplied handle open until all containers using it have started.
- Parameters:
secrets- shared secret material- Returns:
- this container
-
withArchiveLog
Enables or disables archive logging. -
withForceLogging
Enables or disables force logging. -
getOraclePort
Returns the mapped Oracle listener port. -
getLivenessCheckPortNumbers
- Specified by:
getLivenessCheckPortNumbersin interfaceorg.testcontainers.containers.wait.strategy.WaitStrategyTarget- Overrides:
getLivenessCheckPortNumbersin classorg.testcontainers.containers.GenericContainer<SELF extends OracleFreeContainer<SELF>>
-
getDriverClassName
- Specified by:
getDriverClassNamein classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends OracleFreeContainer<SELF>>
-
getPassword
- Specified by:
getPasswordin classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends OracleFreeContainer<SELF>>
-
waitUntilContainerStarted
protected void waitUntilContainerStarted()- Overrides:
waitUntilContainerStartedin classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends OracleFreeContainer<SELF>>
-
configure
protected void configure()- Overrides:
configurein classorg.testcontainers.containers.GenericContainer<SELF extends OracleFreeContainer<SELF>>
-
requireNotBlank
-
hasOracleSecrets
protected final boolean hasOracleSecrets() -
requireValidPassword
-
requireValidPassword
-
normalizeOracleIdentifier
-
isValidOracleIdentifier
-
getTestQueryString
- Specified by:
getTestQueryStringin classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends OracleFreeContainer<SELF>>
-