diff --git a/packages/backend-core/src/configs/configs.ts b/packages/backend-core/src/configs/configs.ts index b461497747..0ec4fb4434 100644 --- a/packages/backend-core/src/configs/configs.ts +++ b/packages/backend-core/src/configs/configs.ts @@ -179,7 +179,7 @@ export async function getGoogleDatasourceConfig(): Promise< } export function getDefaultGoogleConfig(): GoogleInnerConfig | undefined { - if (environment.GOOGLE_CLIENT_ID && environment.GOOGLE_CLIENT_SECRET) { + if (env.isTest() || (environment.GOOGLE_CLIENT_ID && environment.GOOGLE_CLIENT_SECRET)) { return { clientID: environment.GOOGLE_CLIENT_ID!, clientSecret: environment.GOOGLE_CLIENT_SECRET!, diff --git a/packages/server/src/integrations/tests/googlesheets.spec.ts b/packages/server/src/integrations/tests/googlesheets.spec.ts index 1e28be33c6..f832f86954 100644 --- a/packages/server/src/integrations/tests/googlesheets.spec.ts +++ b/packages/server/src/integrations/tests/googlesheets.spec.ts @@ -30,6 +30,7 @@ import { structures } from "@budibase/backend-core/tests" import TestConfiguration from "../../tests/utilities/TestConfiguration" import GoogleSheetsIntegration from "../googlesheets" import { FieldType, Table, TableSchema } from "../../../../types/src/documents" +import environment from "../../environment" describe("Google Sheets Integration", () => { let integration: any,