Class TestDatabaseProvider
java.lang.Object
io.metaloom.test.container.provider.client.TestDatabaseProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProviderClientclient()Return the REST client which can be used to communicate with the provider server that manages the database pooling.static ProviderClientReturn the REST client for the given host and port.static ProviderConfigconfig()Locate the config which was written by the testdatabase-provider-pluginstatic DatabasePoolResponsecreatePool(String poolName, String templateDatabaseName) Create a new testdatabase poolstatic voidCreate a new empty database which can be used to setup a new pool.static voidDrop and create create the database with the given name.
-
Constructor Details
-
TestDatabaseProvider
public TestDatabaseProvider()
-
-
Method Details
-
client
Return the REST client for the given host and port.- Parameters:
host-port-- Returns:
-
client
Return the REST client which can be used to communicate with the provider server that manages the database pooling.- Returns:
- Throws:
IOException
-
config
Locate the config which was written by the testdatabase-provider-plugin- Returns:
-
createPool
public static DatabasePoolResponse createPool(String poolName, String templateDatabaseName) throws Exception Create a new testdatabase pool- Parameters:
poolName-templateDatabaseName-- Returns:
- Throws:
Exception
-
createPostgreSQLDatabase
Create a new empty database which can be used to setup a new pool.- Parameters:
name-- Throws:
SQLException
-
dropCreatePostgreSQLDatabase
Drop and create create the database with the given name.- Parameters:
name-- Throws:
SQLException
-