Fix application delete tests
This commit is contained in:
parent
067462f458
commit
8c68741f98
|
@ -146,7 +146,7 @@ export class DatabaseImpl implements Database {
|
||||||
|
|
||||||
async destroy() {
|
async destroy() {
|
||||||
try {
|
try {
|
||||||
await DatabaseImpl.nano.db.destroy(this.name)
|
return await DatabaseImpl.nano.db.destroy(this.name)
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
// didn't exist, don't worry
|
// didn't exist, don't worry
|
||||||
if (err.statusCode === 404) {
|
if (err.statusCode === 404) {
|
||||||
|
|
|
@ -500,7 +500,9 @@ async function destroyApp(ctx: BBContext) {
|
||||||
await quotas.removeApp()
|
await quotas.removeApp()
|
||||||
await events.app.deleted(app)
|
await events.app.deleted(app)
|
||||||
|
|
||||||
await deleteApp(appId)
|
if (!env.isTest()) {
|
||||||
|
await deleteApp(appId)
|
||||||
|
}
|
||||||
|
|
||||||
await removeAppFromUserRoles(ctx, appId)
|
await removeAppFromUserRoles(ctx, appId)
|
||||||
await cache.app.invalidateAppMetadata(devAppId)
|
await cache.app.invalidateAppMetadata(devAppId)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import PouchDB from "pouchdb"
|
|
||||||
import Nano from "@budibase/nano"
|
import Nano from "@budibase/nano"
|
||||||
import { AllDocsResponse, AnyDocument, Document } from "../"
|
import { AllDocsResponse, AnyDocument, Document } from "../"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue