return gsheets config in test regardless

This commit is contained in:
Martin McKeaveney 2023-03-06 10:22:32 +00:00
parent 851fb6140d
commit e8c73cdee0
2 changed files with 2 additions and 1 deletions

View File

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

View File

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