Package org.firebirdsql.testcontainers
Class FirebirdContainer<SELF extends FirebirdContainer<SELF>>
- java.lang.Object
-
- org.testcontainers.containers.FailureDetectingExternalResource
-
- org.testcontainers.containers.GenericContainer<SELF>
-
- org.testcontainers.containers.JdbcDatabaseContainer<SELF>
-
- org.firebirdsql.testcontainers.FirebirdContainer<SELF>
-
- All Implemented Interfaces:
AutoCloseable,org.junit.rules.TestRule,org.testcontainers.containers.Container<SELF>,org.testcontainers.containers.ContainerState,org.testcontainers.containers.traits.LinkableContainer,org.testcontainers.containers.wait.strategy.WaitStrategyTarget,org.testcontainers.lifecycle.Startable
public class FirebirdContainer<SELF extends FirebirdContainer<SELF>> extends org.testcontainers.containers.JdbcDatabaseContainer<SELF>
-
-
Field Summary
Fields Modifier and Type Field Description static StringALTERNATE_NAMEstatic StringDEFAULT_TAGstatic IntegerFIREBIRD_PORTstatic StringIMAGEstatic StringNAME-
Fields inherited from class org.testcontainers.containers.JdbcDatabaseContainer
parameters, urlParameters
-
-
Constructor Summary
Constructors Constructor Description FirebirdContainer()Deprecated.Use explicit image usingFirebirdContainer(DockerImageName)orFirebirdContainer(String)FirebirdContainer(String dockerImageName)Creates a Firebird container with an image name (e.g.FirebirdContainer(org.testcontainers.utility.DockerImageName dockerImageName)Creates a Firebird container with a parsed image name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigure()StringgetDatabaseName()StringgetDriverClassName()StringgetJdbcUrl()StringgetPassword()protected StringgetTestQueryString()StringgetUsername()static booleanisWireEncryptionSupported()Checks if the JVM meets the Jaybird (Firebird JDBC driver) requirements for encrypted connections.protected voidwaitUntilContainerStarted()SELFwithDatabaseName(String databaseName)SELFwithEnableLegacyClientAuth()Enables legacy authentication plugin (legacy_auth) and use it as the default.SELFwithEnableWireCrypt()Relax wireCrypt setting from Required to Enabled.SELFwithPassword(String password)SELFwithSysdbaPassword(String sysdbaPassword)Set the sysdba password.SELFwithTimeZone(String timeZone)Set the time zone of the image, defaults to the JVM default zone.SELFwithUsername(String username)-
Methods inherited from class org.testcontainers.containers.JdbcDatabaseContainer
addParameter, constructUrlForConnection, constructUrlParameters, constructUrlParameters, containerIsStarted, createConnection, getConnectTimeoutSeconds, getDatabaseDelegate, getJdbcDriverInstance, getStartupTimeoutSeconds, optionallyMapResourceParameterAsVolume, runInitScriptIfRequired, setParameters, withConnectTimeoutSeconds, withInitScript, withStartupTimeoutSeconds, withUrlParam
-
Methods inherited from class org.testcontainers.containers.GenericContainer
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, getLivenessCheckPortNumbers, getLivenessCheckPorts, getLogConsumers, getNetwork, getNetworkAliases, getNetworkMode, getPortBindings, getShmSize, getStartupAttempts, getStartupCheckStrategy, getTestHostIpAddress, getTmpFsMapping, getVolumesFroms, getWaitStrategy, getWorkingDirectory, hashCode, isHostAccessible, isPrivilegedMode, isShouldBeReused, logger, setBinds, setCommand, setCommand, setCommandParts, 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, withCreateContainerCmdModifier, withEnv, withEnv, withExposedPorts, withExtraHost, withFileSystemBind, withImagePullPolicy, withLabel, withLabels, withLogConsumer, withMinimumRunningDuration, withNetwork, withNetworkAliases, withNetworkMode, withPrivilegedMode, withReuse, withSharedMemorySize, withStartupAttempts, withStartupCheckStrategy, withStartupTimeout, withTmpFs, withVolumesFrom, withWorkingDirectory
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.testcontainers.containers.Container
addFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBind
-
Methods inherited from interface org.testcontainers.containers.ContainerState
copyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, getBoundPortNumbers, getContainerIpAddress, getCurrentContainerInfo, getFirstMappedPort, getHost, getLogs, getLogs, getMappedPort, isCreated, isHealthy, isRunning
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
ALTERNATE_NAME
public static final String ALTERNATE_NAME
- See Also:
- Constant Field Values
-
IMAGE
public static final String IMAGE
- See Also:
- Constant Field Values
-
DEFAULT_TAG
public static final String DEFAULT_TAG
- See Also:
- Constant Field Values
-
FIREBIRD_PORT
public static final Integer FIREBIRD_PORT
-
-
Constructor Detail
-
FirebirdContainer
@Deprecated public FirebirdContainer()
Deprecated.Use explicit image usingFirebirdContainer(DockerImageName)orFirebirdContainer(String)Creates a Firebird container with the default image (IMAGEandDEFAULT_TAG).
-
FirebirdContainer
public FirebirdContainer(String dockerImageName)
Creates a Firebird container with an image name (e.g."jacobalberty/firebird:3.0.7".- Parameters:
dockerImageName- Image name
-
FirebirdContainer
public FirebirdContainer(org.testcontainers.utility.DockerImageName dockerImageName)
Creates a Firebird container with a parsed image name.- Parameters:
dockerImageName- Parse image name
-
-
Method Detail
-
configure
protected void configure()
- Overrides:
configurein classorg.testcontainers.containers.GenericContainer<SELF extends FirebirdContainer<SELF>>
-
getDriverClassName
public String getDriverClassName()
- Specified by:
getDriverClassNamein classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
getJdbcUrl
public String getJdbcUrl()
- Specified by:
getJdbcUrlin classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
getDatabaseName
public String getDatabaseName()
- Overrides:
getDatabaseNamein classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
getUsername
public String getUsername()
- Specified by:
getUsernamein classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
getPassword
public String getPassword()
- Specified by:
getPasswordin classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
getTestQueryString
protected String getTestQueryString()
- Specified by:
getTestQueryStringin classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
withDatabaseName
public SELF withDatabaseName(String databaseName)
- Overrides:
withDatabaseNamein classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
withUsername
public SELF withUsername(String username)
- Overrides:
withUsernamein classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
withPassword
public SELF withPassword(String password)
- Overrides:
withPasswordin classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
withEnableLegacyClientAuth
public SELF withEnableLegacyClientAuth()
Enables legacy authentication plugin (legacy_auth) and use it as the default.- Returns:
- this container
-
withEnableWireCrypt
public SELF withEnableWireCrypt()
Relax wireCrypt setting from Required to Enabled.- Returns:
- this container
-
withTimeZone
public SELF withTimeZone(String timeZone)
Set the time zone of the image, defaults to the JVM default zone.- Parameters:
timeZone- Time zone name (prefer long names like Europe/Amsterdam)- Returns:
- this container
-
withSysdbaPassword
public SELF withSysdbaPassword(String sysdbaPassword)
Set the sysdba password.If
usernameis"sysdba"(case insensitive), thenpasswordis used instead.- Parameters:
sysdbaPassword- Sysdba password- Returns:
- this container
-
waitUntilContainerStarted
protected void waitUntilContainerStarted()
- Overrides:
waitUntilContainerStartedin classorg.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
-
isWireEncryptionSupported
public static boolean isWireEncryptionSupported()
Checks if the JVM meets the Jaybird (Firebird JDBC driver) requirements for encrypted connections.Specifically, this checks if the ARC4 cipher can be used with 160 bit keys.
- Returns:
trueif Jaybird will be able to support encrypted connections on this JVM.
-
-