From e8c73cdee0f1814b29af376f54bcc30be419720b Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 6 Mar 2023 10:22:32 +0000 Subject: [PATCH] return gsheets config in test regardless --- packages/backend-core/src/configs/configs.ts | 2 +- packages/server/src/integrations/tests/googlesheets.spec.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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,