Class DockerDatabaseWrapper


  • public class DockerDatabaseWrapper
    extends DatabaseWrapper
    Implementation of DatabaseWrapper for databases that are managed via docker in JdbcDatabaseContainers.
    • Constructor Detail

      • DockerDatabaseWrapper

        public DockerDatabaseWrapper​(org.testcontainers.containers.JdbcDatabaseContainer container,
                                     TestSystem testSystem)
    • Method Detail

      • describe

        public String describe()
        Description copied from class: DatabaseWrapper
        Describes the configuration of this wrapper. Used in outputting to user how this connection is configured.
        Specified by:
        describe in class DatabaseWrapper
      • start

        public void start()
                   throws Exception
        Description copied from class: DatabaseWrapper
        Start the database if possible and ensure it can be connected to. If the database is managed externally, just ensure it can be connected to.
        Specified by:
        start in class DatabaseWrapper
        Throws:
        Exception
      • requireLicense

        protected Runnable requireLicense()
        If the container requires the user accepting a license, return a Runnable which will accept it.
        Returns:
        a non-null value if start() should call the Runnable if the user accepted the license.
      • mapPorts

        protected void mapPorts​(org.testcontainers.containers.JdbcDatabaseContainer container)
      • getContainer

        public org.testcontainers.containers.JdbcDatabaseContainer getContainer()