Create non-plus datasource
This commit is contained in:
parent
122cd843ab
commit
cb6977a18b
|
@ -18,6 +18,7 @@ import {
|
||||||
generator,
|
generator,
|
||||||
structures,
|
structures,
|
||||||
} from "@budibase/backend-core/tests"
|
} from "@budibase/backend-core/tests"
|
||||||
|
import { basicDatasource } from "../../../tests/utilities/structures"
|
||||||
|
|
||||||
const timestamp = new Date("2023-01-26T11:48:57.597Z").toISOString()
|
const timestamp = new Date("2023-01-26T11:48:57.597Z").toISOString()
|
||||||
tk.freeze(timestamp)
|
tk.freeze(timestamp)
|
||||||
|
@ -37,6 +38,12 @@ describe("/rows", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
|
await config.createDatasource({
|
||||||
|
datasource: {
|
||||||
|
...basicDatasource().datasource,
|
||||||
|
plus: false,
|
||||||
|
},
|
||||||
|
})
|
||||||
table = await config.createTable()
|
table = await config.createTable()
|
||||||
row = basicRow(table._id!)
|
row = basicRow(table._id!)
|
||||||
})
|
})
|
||||||
|
|
|
@ -546,6 +546,9 @@ class TestConfiguration {
|
||||||
config = config || basicTable()
|
config = config || basicTable()
|
||||||
if (this.datasource && !config.sourceId) {
|
if (this.datasource && !config.sourceId) {
|
||||||
config.sourceId = this.datasource._id
|
config.sourceId = this.datasource._id
|
||||||
|
if (this.datasource.plus) {
|
||||||
|
config.type = "external"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.updateTable(config, options)
|
return this.updateTable(config, options)
|
||||||
|
|
Loading…
Reference in New Issue