PR comments
This commit is contained in:
parent
edac525424
commit
26660b12fb
|
@ -179,7 +179,7 @@ export async function getGoogleDatasourceConfig(): Promise<
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDefaultGoogleConfig(): GoogleInnerConfig | undefined {
|
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 {
|
return {
|
||||||
clientID: environment.GOOGLE_CLIENT_ID!,
|
clientID: environment.GOOGLE_CLIENT_ID!,
|
||||||
clientSecret: environment.GOOGLE_CLIENT_SECRET!,
|
clientSecret: environment.GOOGLE_CLIENT_SECRET!,
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue