Adding wait strategy to Postgres runner.

This commit is contained in:
mike12345567 2023-08-23 17:42:01 +01:00
parent 9f900503ae
commit 6731eefefd
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,7 @@ import {
import _ from "lodash"
import { generator } from "@budibase/backend-core/tests"
import { utils } from "@budibase/backend-core"
import { GenericContainer } from "testcontainers"
import { GenericContainer, Wait } from "testcontainers"
const config = setup.getConfig()!
@ -42,6 +42,7 @@ describe("postgres integrations", () => {
const container = await new GenericContainer("postgres")
.withExposedPorts(5432)
.withEnv("POSTGRES_PASSWORD", "password")
.withWaitStrategy(Wait.forLogMessage("PostgreSQL init process complete; ready for start up."))
.start()
host = container.getContainerIpAddress()