Remove test logic from getAllDbs
This commit is contained in:
parent
792f4cf772
commit
fc6c4d5290
|
@ -8,6 +8,8 @@ MINIO_ACCESS_KEY=budibase
|
||||||
MINIO_SECRET_KEY=budibase
|
MINIO_SECRET_KEY=budibase
|
||||||
COUCH_DB_PASSWORD=budibase
|
COUCH_DB_PASSWORD=budibase
|
||||||
COUCH_DB_USER=budibase
|
COUCH_DB_USER=budibase
|
||||||
|
COUCHDB_PASSWORD=budibase
|
||||||
|
COUCHDB_USER=budibase
|
||||||
REDIS_PASSWORD=budibase
|
REDIS_PASSWORD=budibase
|
||||||
INTERNAL_API_KEY=budibase
|
INTERNAL_API_KEY=budibase
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
APP_PREFIX,
|
APP_PREFIX,
|
||||||
} from "../constants"
|
} from "../constants"
|
||||||
import { getTenantId, getGlobalDB, getGlobalDBName } from "../context"
|
import { getTenantId, getGlobalDB, getGlobalDBName } from "../context"
|
||||||
import { doWithDB, allDbs, directCouchAllDbs } from "./db"
|
import { doWithDB, directCouchAllDbs } from "./db"
|
||||||
import { getAppMetadata } from "../cache/appMetadata"
|
import { getAppMetadata } from "../cache/appMetadata"
|
||||||
import { isDevApp, isDevAppID, getProdAppID } from "./conversions"
|
import { isDevApp, isDevAppID, getProdAppID } from "./conversions"
|
||||||
import * as events from "../events"
|
import * as events from "../events"
|
||||||
|
@ -262,10 +262,7 @@ export function getStartEndKeyURL(baseKey: any, tenantId?: string) {
|
||||||
*/
|
*/
|
||||||
export async function getAllDbs(opts = { efficient: false }) {
|
export async function getAllDbs(opts = { efficient: false }) {
|
||||||
const efficient = opts && opts.efficient
|
const efficient = opts && opts.efficient
|
||||||
// specifically for testing we use the pouch package for this
|
|
||||||
if (env.isTest()) {
|
|
||||||
return allDbs()
|
|
||||||
}
|
|
||||||
let dbs: any[] = []
|
let dbs: any[] = []
|
||||||
async function addDbs(queryString?: string) {
|
async function addDbs(queryString?: string) {
|
||||||
const json = await directCouchAllDbs(queryString)
|
const json = await directCouchAllDbs(queryString)
|
||||||
|
|
Loading…
Reference in New Issue