Delete apps on end
This commit is contained in:
parent
eedc49de14
commit
da8f7eff6c
|
@ -137,21 +137,28 @@ class TestConfiguration {
|
|||
return this.createApp(appName)
|
||||
}
|
||||
|
||||
end() {
|
||||
async end() {
|
||||
if (!this) {
|
||||
return
|
||||
}
|
||||
if (this.server) {
|
||||
this.server.close()
|
||||
}
|
||||
if (this.allApps) {
|
||||
cleanup(this.allApps.map(app => app.appId))
|
||||
|
||||
await this._req(
|
||||
null,
|
||||
{ appId: this.prodApp.appId },
|
||||
controllers.app.destroy
|
||||
)
|
||||
}
|
||||
|
||||
if (this.server) {
|
||||
this.server.close()
|
||||
}
|
||||
}
|
||||
|
||||
// UTILS
|
||||
|
||||
async _req(body: any, params: any, controlFunc: any) {
|
||||
_req(body: any, params: any, controlFunc: any) {
|
||||
// create a fake request ctx
|
||||
const request: any = {}
|
||||
const appId = this.appId
|
||||
|
|
Loading…
Reference in New Issue