Class FirebirdContainer<SELF extends 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>
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.testcontainers.containers.JdbcDatabaseContainer

        org.testcontainers.containers.JdbcDatabaseContainer.NoDriverFoundException
      • Nested classes/interfaces inherited from interface org.testcontainers.containers.Container

        org.testcontainers.containers.Container.ExecResult
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String ALTERNATE_NAME  
      static String DEFAULT_TAG  
      static Integer FIREBIRD_PORT  
      static String IMAGE  
      static String NAME  
      • Fields inherited from class org.testcontainers.containers.JdbcDatabaseContainer

        parameters, urlParameters
      • Fields inherited from class org.testcontainers.containers.GenericContainer

        CONTAINER_RUNNING_TIMEOUT_SEC, dependencies, dockerClient, INTERNAL_HOST_HOSTNAME, waitStrategy
      • Fields inherited from interface org.testcontainers.containers.ContainerState

        STATE_HEALTHY
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void configure()  
      String getDatabaseName()  
      String getDriverClassName()  
      String getJdbcUrl()  
      String getPassword()  
      protected String getTestQueryString()  
      String getUsername()  
      static boolean isWireEncryptionSupported()
      Checks if the JVM meets the Jaybird (Firebird JDBC driver) requirements for encrypted connections.
      protected void waitUntilContainerStarted()  
      SELF withDatabaseName​(String databaseName)  
      SELF withEnableLegacyClientAuth()
      Enables legacy authentication plugin (legacy_auth) and use it as the default.
      SELF withEnableWireCrypt()
      Relax wireCrypt setting from Required to Enabled.
      SELF withPassword​(String password)  
      SELF withSysdbaPassword​(String sysdbaPassword)
      Set the sysdba password.
      SELF withTimeZone​(String timeZone)
      Set the time zone of the image, defaults to the JVM default zone.
      SELF withUsername​(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 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
      • Methods inherited from interface org.testcontainers.containers.traits.LinkableContainer

        getContainerName
      • Methods inherited from interface org.testcontainers.lifecycle.Startable

        close
    • Constructor Detail

      • 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:
        configure in class org.testcontainers.containers.GenericContainer<SELF extends FirebirdContainer<SELF>>
      • getDriverClassName

        public String getDriverClassName()
        Specified by:
        getDriverClassName in class org.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
      • getJdbcUrl

        public String getJdbcUrl()
        Specified by:
        getJdbcUrl in class org.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
      • getDatabaseName

        public String getDatabaseName()
        Overrides:
        getDatabaseName in class org.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
      • getUsername

        public String getUsername()
        Specified by:
        getUsername in class org.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
      • getPassword

        public String getPassword()
        Specified by:
        getPassword in class org.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
      • getTestQueryString

        protected String getTestQueryString()
        Specified by:
        getTestQueryString in class org.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
      • withDatabaseName

        public SELF withDatabaseName​(String databaseName)
        Overrides:
        withDatabaseName in class org.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
      • withUsername

        public SELF withUsername​(String username)
        Overrides:
        withUsername in class org.testcontainers.containers.JdbcDatabaseContainer<SELF extends FirebirdContainer<SELF>>
      • withPassword

        public SELF withPassword​(String password)
        Overrides:
        withPassword in class org.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 username is "sysdba" (case insensitive), then password is used instead.

        Parameters:
        sysdbaPassword - Sysdba password
        Returns:
        this container
      • waitUntilContainerStarted

        protected void waitUntilContainerStarted()
        Overrides:
        waitUntilContainerStarted in class org.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:
        true if Jaybird will be able to support encrypted connections on this JVM.