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 "../"