PostgresContainer constructor
PostgresContainer([
- String image = 'postgres:17-alpine'
PostgreSQL from image (postgres:17-alpine unless given), with the
database, user and password test.
Implementation
PostgresContainer([super.image = 'postgres:17-alpine']) {
withDatabaseName('test');
withUsername('test');
withPassword('test');
withExposedPorts([port]);
waitingFor(
Wait.forAll([
Wait.forLogMessage('database system is ready to accept connections', 2),
Wait.forListeningPort(),
const PostgresProtocolWait(),
]),
);
}