1
0
Fork 0
mirror of synced 2024-08-15 18:11:40 +12:00

Fix application delete tests

This commit is contained in:
Adria Navarro Redo 2023-01-25 17:13:23 +00:00 committed by adrinr
parent 067462f458
commit 8c68741f98
3 changed files with 4 additions and 3 deletions

View file

@ -146,7 +146,7 @@ export class DatabaseImpl implements Database {
async destroy() {
try {
await DatabaseImpl.nano.db.destroy(this.name)
return await DatabaseImpl.nano.db.destroy(this.name)
} catch (err: any) {
// didn't exist, don't worry
if (err.statusCode === 404) {

View file

@ -500,7 +500,9 @@ async function destroyApp(ctx: BBContext) {
await quotas.removeApp()
await events.app.deleted(app)
await deleteApp(appId)
if (!env.isTest()) {
await deleteApp(appId)
}
await removeAppFromUserRoles(ctx, appId)
await cache.app.invalidateAppMetadata(devAppId)

View file

@ -1,4 +1,3 @@
import PouchDB from "pouchdb"
import Nano from "@budibase/nano"
import { AllDocsResponse, AnyDocument, Document } from "../"