Update app/__test__/data/postgres.test.ts
Run Tests / test (pull_request) Failing after 5m34s

This commit is contained in:
2026-09-25 10:14:53 +00:00
parent 8cb3abd071
commit c358b5b9b7
+5
View File
@@ -39,6 +39,11 @@ async function isPostgresRunning() {
describe("postgres", () => { describe("postgres", () => {
beforeAll(async () => { beforeAll(async () => {
if (process.env.GITEA_ACTIONS || process.env.GITHUB_ACTIONS) {
console.log("Running in CI: Skipping manual docker run");
return;
}
if (!(await isPostgresRunning())) { if (!(await isPostgresRunning())) {
await $`docker run --rm --name bknd-test-postgres -d -e POSTGRES_PASSWORD=${credentials.password} -e POSTGRES_USER=${credentials.user} -e POSTGRES_DB=${credentials.database} -p ${credentials.port}:5432 postgres:17`; await $`docker run --rm --name bknd-test-postgres -d -e POSTGRES_PASSWORD=${credentials.password} -e POSTGRES_USER=${credentials.user} -e POSTGRES_DB=${credentials.database} -p ${credentials.port}:5432 postgres:17`;
await $waitUntil("Postgres is running", isPostgresRunning, 500, 20); await $waitUntil("Postgres is running", isPostgresRunning, 500, 20);