Merge pull request #9885 from Budibase/fix/gsheets-test

Fix/gsheets test
This commit is contained in:
Martin McKeaveney 2023-03-06 11:00:28 +00:00 committed by GitHub
commit 3433e49f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,10 @@ describe("Google Sheets Integration", () => {
let integration: any, let integration: any,
config = new TestConfiguration() config = new TestConfiguration()
beforeAll(() => {
config.setGoogleAuth("test")
})
beforeEach(async () => { beforeEach(async () => {
integration = new GoogleSheetsIntegration.integration({ integration = new GoogleSheetsIntegration.integration({
spreadsheetId: "randomId", spreadsheetId: "randomId",

View File

@ -181,6 +181,13 @@ class TestConfiguration {
coreEnv._set("SELF_HOSTED", value) 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 = () => { modeCloud = () => {
this.setSelfHosted(false) this.setSelfHosted(false)
} }