1
0
Fork 0
mirror of synced 2024-07-07 15:25:52 +12:00

PR comments

This commit is contained in:
Martin McKeaveney 2023-03-06 10:33:49 +00:00
parent edac525424
commit 26660b12fb
3 changed files with 12 additions and 1 deletions

View file

@ -179,7 +179,7 @@ export async function getGoogleDatasourceConfig(): Promise<
}
export function getDefaultGoogleConfig(): GoogleInnerConfig | undefined {
if (env.isTest() || (environment.GOOGLE_CLIENT_ID && environment.GOOGLE_CLIENT_SECRET)) {
if (environment.GOOGLE_CLIENT_ID && environment.GOOGLE_CLIENT_SECRET) {
return {
clientID: environment.GOOGLE_CLIENT_ID!,
clientSecret: environment.GOOGLE_CLIENT_SECRET!,

View file

@ -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",

View file

@ -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)
}