From cb6977a18b421d64db16ff22b304b16cad092fa9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 4 Sep 2023 17:01:49 +0200 Subject: [PATCH] Create non-plus datasource --- packages/server/src/api/routes/tests/row.spec.ts | 7 +++++++ packages/server/src/tests/utilities/TestConfiguration.ts | 3 +++ 2 files changed, 10 insertions(+) diff --git a/packages/server/src/api/routes/tests/row.spec.ts b/packages/server/src/api/routes/tests/row.spec.ts index f7878b2182..71c4325f92 100644 --- a/packages/server/src/api/routes/tests/row.spec.ts +++ b/packages/server/src/api/routes/tests/row.spec.ts @@ -18,6 +18,7 @@ import { generator, structures, } from "@budibase/backend-core/tests" +import { basicDatasource } from "../../../tests/utilities/structures" const timestamp = new Date("2023-01-26T11:48:57.597Z").toISOString() tk.freeze(timestamp) @@ -37,6 +38,12 @@ describe("/rows", () => { }) beforeEach(async () => { + await config.createDatasource({ + datasource: { + ...basicDatasource().datasource, + plus: false, + }, + }) table = await config.createTable() row = basicRow(table._id!) }) diff --git a/packages/server/src/tests/utilities/TestConfiguration.ts b/packages/server/src/tests/utilities/TestConfiguration.ts index 137828f188..5d5d6a18e5 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.ts +++ b/packages/server/src/tests/utilities/TestConfiguration.ts @@ -546,6 +546,9 @@ class TestConfiguration { config = config || basicTable() if (this.datasource && !config.sourceId) { config.sourceId = this.datasource._id + if (this.datasource.plus) { + config.type = "external" + } } return this.updateTable(config, options)