Remove test logic from getAllDbs

This commit is contained in:
Adria Navarro 2023-01-24 14:06:28 +00:00
parent 792f4cf772
commit fc6c4d5290
2 changed files with 4 additions and 5 deletions

View File

@ -8,6 +8,8 @@ MINIO_ACCESS_KEY=budibase
MINIO_SECRET_KEY=budibase
COUCH_DB_PASSWORD=budibase
COUCH_DB_USER=budibase
COUCHDB_PASSWORD=budibase
COUCHDB_USER=budibase
REDIS_PASSWORD=budibase
INTERNAL_API_KEY=budibase

View File

@ -10,7 +10,7 @@ import {
APP_PREFIX,
} from "../constants"
import { getTenantId, getGlobalDB, getGlobalDBName } from "../context"
import { doWithDB, allDbs, directCouchAllDbs } from "./db"
import { doWithDB, directCouchAllDbs } from "./db"
import { getAppMetadata } from "../cache/appMetadata"
import { isDevApp, isDevAppID, getProdAppID } from "./conversions"
import * as events from "../events"
@ -262,10 +262,7 @@ export function getStartEndKeyURL(baseKey: any, tenantId?: string) {
*/
export async function getAllDbs(opts = { efficient: false }) {
const efficient = opts && opts.efficient
// specifically for testing we use the pouch package for this
if (env.isTest()) {
return allDbs()
}
let dbs: any[] = []
async function addDbs(queryString?: string) {
const json = await directCouchAllDbs(queryString)