diff --git a/packages/server/src/integration-test/postgres.spec.ts b/packages/server/src/integration-test/postgres.spec.ts index bcd1c14389..84c19f8bbc 100644 --- a/packages/server/src/integration-test/postgres.spec.ts +++ b/packages/server/src/integration-test/postgres.spec.ts @@ -43,6 +43,10 @@ describe("postgres integrations", () => { ) }) + afterAll(async () => { + await databaseTestProviders.postgres.stopContainer() + }) + beforeEach(async () => { async function createAuxTable(prefix: string) { return await config.createTable({ diff --git a/packages/server/src/integrations/tests/utils/postgres.ts b/packages/server/src/integrations/tests/utils/postgres.ts index 036e81bbd8..b749551721 100644 --- a/packages/server/src/integrations/tests/utils/postgres.ts +++ b/packages/server/src/integrations/tests/utils/postgres.ts @@ -36,3 +36,10 @@ export async function getDsConfig(): Promise { }, } } + +export async function stopContainer() { + if (container) { + await container.stop() + container = undefined + } +}