Merge pull request #12054 from Budibase/fix/stop-postgres-container-after-postgres-tests
Stop the `postgres` container after the Postgres integration tests run.
This commit is contained in:
commit
88bb7943b0
|
@ -43,6 +43,10 @@ describe("postgres integrations", () => {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
afterAll(async () => {
|
||||||
|
await databaseTestProviders.postgres.stopContainer()
|
||||||
|
})
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
async function createAuxTable(prefix: string) {
|
async function createAuxTable(prefix: string) {
|
||||||
return await config.createTable({
|
return await config.createTable({
|
||||||
|
|
|
@ -36,3 +36,10 @@ export async function getDsConfig(): Promise<Datasource> {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function stopContainer() {
|
||||||
|
if (container) {
|
||||||
|
await container.stop()
|
||||||
|
container = undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue