Implement WaitForExec using new Client library. Add BaseWait to avoid some code duplication. Adjust Postgres test

This commit is contained in:
Sergei Shitikov
2024-09-01 18:23:21 +02:00
parent 3dd4d2525a
commit ea07a96091
6 changed files with 94 additions and 45 deletions
@@ -10,8 +10,8 @@ class PostgreSQLContainerTest extends ContainerTestCase
{
public static function setUpBeforeClass(): void
{
self::$container = (new PostgresContainer('latest', 'test'))
->withPostgresUser('test')
self::$container = (new PostgresContainer())
->withPostgresUser('bar')
->withPostgresDatabase('foo')
->start();
}
@@ -19,8 +19,8 @@ class PostgreSQLContainerTest extends ContainerTestCase
public function testPostgreSQLContainer(): void
{
$pdo = new \PDO(
sprintf('pgsql:host=%s;port=5432;dbname=foo', self::$container->getAddress()),
'test',
'pgsql:host=127.0.0.1;port=5432;dbname=foo',
'bar',
'test',
);