public class DockerDatabaseWrapper extends DatabaseWrapper
DatabaseWrapper for databases that are managed via docker in JdbcDatabaseContainers.| Modifier and Type | Field and Description |
|---|---|
static String |
TEST_SYSTEM_LABEL |
| Constructor and Description |
|---|
DockerDatabaseWrapper(org.testcontainers.containers.JdbcDatabaseContainer container,
TestSystem testSystem) |
| Modifier and Type | Method and Description |
|---|---|
String |
describe()
Describes the configuration of this wrapper.
|
org.testcontainers.containers.JdbcDatabaseContainer |
getContainer() |
String |
getUrl() |
String |
getUsername() |
protected void |
mapPorts(org.testcontainers.containers.JdbcDatabaseContainer container) |
protected Runnable |
requireLicense()
If the container requires the user accepting a license, return a Runnable which will accept it.
|
void |
start()
Start the database if possible and ensure it can be connected to.
|
void |
stop()
Stop the database if possible.
|
public static final String TEST_SYSTEM_LABEL
public DockerDatabaseWrapper(org.testcontainers.containers.JdbcDatabaseContainer container,
TestSystem testSystem)
public String describe()
DatabaseWrapperdescribe in class DatabaseWrapperpublic void start()
throws Exception
DatabaseWrapperstart in class DatabaseWrapperExceptionprotected Runnable requireLicense()
start() should call the Runnable if the user accepted the license.protected void mapPorts(org.testcontainers.containers.JdbcDatabaseContainer container)
public void stop()
throws Exception
DatabaseWrapperstop in class DatabaseWrapperExceptionpublic String getUrl()
getUrl in class DatabaseWrapperpublic org.testcontainers.containers.JdbcDatabaseContainer getContainer()
public String getUsername()
getUsername in class DatabaseWrapperCopyright © 2023 Liquibase.org. All rights reserved.