feat: add waitForLog to docker container

This commit is contained in:
2024-07-19 17:13:43 +02:00
parent 82635f71ff
commit 7ee495f879
10 changed files with 1618 additions and 33 deletions

View File

@@ -68,13 +68,9 @@ export class PostgresTestContainer {
});
await container.start();
await container.logs((line) => {
if (line.includes("init process complete")) {
return true;
}
});
await container.waitForLog("database system is ready");
await delay(1000);
await delay(250);
return new PostgresTestContainer(container, port, {
username: config.username ?? "postgres",