diff --git a/packages/server/src/integrations/tests/googlesheets.spec.ts b/packages/server/src/integrations/tests/googlesheets.spec.ts index 1e28be33c6..5d7c184abd 100644 --- a/packages/server/src/integrations/tests/googlesheets.spec.ts +++ b/packages/server/src/integrations/tests/googlesheets.spec.ts @@ -35,6 +35,10 @@ describe("Google Sheets Integration", () => { let integration: any, config = new TestConfiguration() + beforeAll(() => { + config.setGoogleAuth("test") + }) + beforeEach(async () => { integration = new GoogleSheetsIntegration.integration({ spreadsheetId: "randomId", diff --git a/packages/server/src/tests/utilities/TestConfiguration.ts b/packages/server/src/tests/utilities/TestConfiguration.ts index e9b770229f..9aab76ba4d 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.ts +++ b/packages/server/src/tests/utilities/TestConfiguration.ts @@ -181,6 +181,13 @@ class TestConfiguration { coreEnv._set("SELF_HOSTED", value) } + setGoogleAuth = (value: string) => { + env._set("GOOGLE_CLIENT_ID", value) + env._set("GOOGLE_CLIENT_SECRET", value) + coreEnv._set("GOOGLE_CLIENT_ID", value) + coreEnv._set("GOOGLE_CLIENT_SECRET", value) + } + modeCloud = () => { this.setSelfHosted(false) }