Adding context update to test case since it used to rely on the context update functionality.
This commit is contained in:
parent
2548d89f04
commit
49da99c8ac
1 changed files with 10 additions and 6 deletions
|
@ -2,7 +2,7 @@ import TestConfig from "../../../../tests/utilities/TestConfiguration"
|
||||||
import * as syncRows from "../syncRows"
|
import * as syncRows from "../syncRows"
|
||||||
import { quotas } from "@budibase/pro"
|
import { quotas } from "@budibase/pro"
|
||||||
import { QuotaUsageType, StaticQuotaName } from "@budibase/types"
|
import { QuotaUsageType, StaticQuotaName } from "@budibase/types"
|
||||||
const { db: dbCore } = require("@budibase/backend-core")
|
import { db as dbCore, context } from "@budibase/backend-core"
|
||||||
|
|
||||||
describe("syncRows", () => {
|
describe("syncRows", () => {
|
||||||
let config = new TestConfig(false)
|
let config = new TestConfig(false)
|
||||||
|
@ -24,13 +24,17 @@ describe("syncRows", () => {
|
||||||
|
|
||||||
// app 1
|
// app 1
|
||||||
const app1 = config.app
|
const app1 = config.app
|
||||||
await config.createTable()
|
await context.doInAppContext(app1.appId, async () => {
|
||||||
await config.createRow()
|
await config.createTable()
|
||||||
|
await config.createRow()
|
||||||
|
})
|
||||||
// app 2
|
// app 2
|
||||||
const app2 = await config.createApp("second-app")
|
const app2 = await config.createApp("second-app")
|
||||||
await config.createTable()
|
await context.doInAppContext(app2.appId, async () => {
|
||||||
await config.createRow()
|
await config.createTable()
|
||||||
await config.createRow()
|
await config.createRow()
|
||||||
|
await config.createRow()
|
||||||
|
})
|
||||||
|
|
||||||
// migrate
|
// migrate
|
||||||
await syncRows.run()
|
await syncRows.run()
|
||||||
|
|
Loading…
Reference in a new issue