diff --git a/packages/backend-core/src/db/db.ts b/packages/backend-core/src/db/db.ts index 3887e8b09f..c54a4faea4 100644 --- a/packages/backend-core/src/db/db.ts +++ b/packages/backend-core/src/db/db.ts @@ -7,11 +7,11 @@ const dbList = new Set() export function getDB(dbName?: string, opts?: any): Database { // TODO: once using the test image, need to remove this - if (env.isTest()) { - dbList.add(dbName) - // @ts-ignore - return getPouchDB(dbName, opts) - } + // if (env.isTest()) { + // dbList.add(dbName) + // // @ts-ignore + // return getPouchDB(dbName, opts) + // } return new DatabaseImpl(dbName, opts) } diff --git a/packages/server/src/tests/jestSetup.ts b/packages/server/src/tests/jestSetup.ts index b53ac2d9fa..cebc01b864 100644 --- a/packages/server/src/tests/jestSetup.ts +++ b/packages/server/src/tests/jestSetup.ts @@ -11,6 +11,8 @@ env._set("PORT", 0) env._set("MINIO_URL", "http://localhost") env._set("MINIO_ACCESS_KEY", "test") env._set("MINIO_SECRET_KEY", "test") +env._set("COUCH_DB_USER", "budibase") +env._set("COUCH_DB_PASSWORD", "budibase") import { mocks } from "@budibase/backend-core/tests" diff --git a/packages/worker/src/tests/jestSetup.ts b/packages/worker/src/tests/jestSetup.ts index ab82cb5be7..467ea73c79 100644 --- a/packages/worker/src/tests/jestSetup.ts +++ b/packages/worker/src/tests/jestSetup.ts @@ -1,4 +1,5 @@ import env from "../environment" +import { env as coreEnv } from "@budibase/backend-core" env._set("SELF_HOSTED", "0") env._set("NODE_ENV", "jest") @@ -11,6 +12,8 @@ env._set("MINIO_SECRET_KEY", "test") env._set("PLATFORM_URL", "http://localhost:10000") env._set("INTERNAL_API_KEY", "test") env._set("DISABLE_ACCOUNT_PORTAL", false) +coreEnv._set("COUCH_DB_USER", "budibase") +coreEnv._set("COUCH_DB_PASSWORD", "budibase") import { mocks } from "@budibase/backend-core/tests"