1
0
Fork 0
mirror of synced 2024-07-13 18:26:06 +12:00

Make sure to stop postgres container after the postgres integration tests have run.

This commit is contained in:
Sam Rose 2023-10-13 09:50:45 +01:00
parent 702ee4d504
commit 18363b7b60
2 changed files with 11 additions and 0 deletions

View file

@ -43,6 +43,10 @@ describe("postgres integrations", () => {
)
})
afterAll(async () => {
await databaseTestProviders.postgres.stopContainer()
})
beforeEach(async () => {
async function createAuxTable(prefix: string) {
return await config.createTable({

View file

@ -36,3 +36,10 @@ export async function getDsConfig(): Promise<Datasource> {
},
}
}
export async function stopContainer() {
if (container) {
await container.stop()
container = undefined
}
}