Fix datasource.spec.ts tests.
This commit is contained in:
parent
bd4724f52a
commit
6fe993ad53
|
@ -14,7 +14,11 @@ import {
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { cloneDeep } from "lodash/fp"
|
import { cloneDeep } from "lodash/fp"
|
||||||
import { getEnvironmentVariables } from "../../utils"
|
import { getEnvironmentVariables } from "../../utils"
|
||||||
import { getDefinitions, getDefinition } from "../../../integrations"
|
import {
|
||||||
|
getDefinitions,
|
||||||
|
getDefinition,
|
||||||
|
getIntegration,
|
||||||
|
} from "../../../integrations"
|
||||||
import merge from "lodash/merge"
|
import merge from "lodash/merge"
|
||||||
import {
|
import {
|
||||||
BudibaseInternalDB,
|
BudibaseInternalDB,
|
||||||
|
@ -292,6 +296,9 @@ export async function save(
|
||||||
datasource: Datasource,
|
datasource: Datasource,
|
||||||
opts?: { fetchSchema?: boolean; tablesFilter?: string[] }
|
opts?: { fetchSchema?: boolean; tablesFilter?: string[] }
|
||||||
): Promise<{ datasource: Datasource; errors: Record<string, string> }> {
|
): Promise<{ datasource: Datasource; errors: Record<string, string> }> {
|
||||||
|
// getIntegration throws an error if the integration is not found
|
||||||
|
await getIntegration(datasource.source)
|
||||||
|
|
||||||
const db = context.getAppDB()
|
const db = context.getAppDB()
|
||||||
const plus = datasource.plus
|
const plus = datasource.plus
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue