diff --git a/packages/server/src/api/routes/tests/row.spec.ts b/packages/server/src/api/routes/tests/row.spec.ts index 239da36351..726e493b2d 100644 --- a/packages/server/src/api/routes/tests/row.spec.ts +++ b/packages/server/src/api/routes/tests/row.spec.ts @@ -110,7 +110,7 @@ describe.each([ config.api.row.get(tbl_Id, id, { expectStatus: status }) const getRowUsage = async () => { - const { total } = await config.doInContext(null, () => + const { total } = await config.doInContext(undefined, () => quotas.getCurrentUsageValues(QuotaUsageType.STATIC, StaticQuotaName.ROWS) ) return total diff --git a/packages/server/src/migrations/functions/usageQuotas/tests/syncApps.spec.ts b/packages/server/src/migrations/functions/usageQuotas/tests/syncApps.spec.ts index d0d50395b2..1d4d4d0f71 100644 --- a/packages/server/src/migrations/functions/usageQuotas/tests/syncApps.spec.ts +++ b/packages/server/src/migrations/functions/usageQuotas/tests/syncApps.spec.ts @@ -13,7 +13,7 @@ describe("syncApps", () => { afterAll(config.end) it("runs successfully", async () => { - return config.doInContext(null, async () => { + return config.doInContext(undefined, async () => { // create the usage quota doc and mock usages await quotas.getQuotaUsage() await quotas.setUsage(3, StaticQuotaName.APPS, QuotaUsageType.STATIC) diff --git a/packages/server/src/migrations/functions/usageQuotas/tests/syncCreators.spec.ts b/packages/server/src/migrations/functions/usageQuotas/tests/syncCreators.spec.ts index 75fa9f217e..93b7d4949b 100644 --- a/packages/server/src/migrations/functions/usageQuotas/tests/syncCreators.spec.ts +++ b/packages/server/src/migrations/functions/usageQuotas/tests/syncCreators.spec.ts @@ -12,8 +12,8 @@ describe("syncCreators", () => { afterAll(config.end) it("syncs creators", async () => { - return config.doInContext(null, async () => { - await config.createUser({ admin: true }) + return config.doInContext(undefined, async () => { + await config.createUser({ admin: { global: true } }) await syncCreators.run() diff --git a/packages/server/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts b/packages/server/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts index e644d605b6..730278683c 100644 --- a/packages/server/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts +++ b/packages/server/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts @@ -14,7 +14,7 @@ describe("syncRows", () => { afterAll(config.end) it("runs successfully", async () => { - return config.doInContext(null, async () => { + return config.doInContext(undefined, async () => { // create the usage quota doc and mock usages await quotas.getQuotaUsage() await quotas.setUsage(300, StaticQuotaName.ROWS, QuotaUsageType.STATIC) diff --git a/packages/server/src/migrations/functions/usageQuotas/tests/syncUsers.spec.ts b/packages/server/src/migrations/functions/usageQuotas/tests/syncUsers.spec.ts index f7500c8b4d..2731cc041d 100644 --- a/packages/server/src/migrations/functions/usageQuotas/tests/syncUsers.spec.ts +++ b/packages/server/src/migrations/functions/usageQuotas/tests/syncUsers.spec.ts @@ -12,7 +12,7 @@ describe("syncUsers", () => { afterAll(config.end) it("syncs users", async () => { - return config.doInContext(null, async () => { + return config.doInContext(undefined, async () => { await config.createUser() await syncUsers.run() diff --git a/packages/server/src/sdk/app/rows/tests/internal.spec.ts b/packages/server/src/sdk/app/rows/tests/internal.spec.ts index dda41d5720..3908ef83ed 100644 --- a/packages/server/src/sdk/app/rows/tests/internal.spec.ts +++ b/packages/server/src/sdk/app/rows/tests/internal.spec.ts @@ -81,7 +81,7 @@ describe("sdk >> rows >> internal", () => { const response = await internalSdk.save( table._id!, row, - config.user._id + config.getUser()._id ) expect(response).toEqual({ @@ -129,7 +129,7 @@ describe("sdk >> rows >> internal", () => { const response = await internalSdk.save( table._id!, row, - config.user._id + config.getUser()._id ) expect(response).toEqual({ @@ -190,15 +190,15 @@ describe("sdk >> rows >> internal", () => { await config.doInContext(config.appId, async () => { for (const row of makeRows(5)) { - await internalSdk.save(table._id!, row, config.user._id) + await internalSdk.save(table._id!, row, config.getUser()._id) } await Promise.all( makeRows(10).map(row => - internalSdk.save(table._id!, row, config.user._id) + internalSdk.save(table._id!, row, config.getUser()._id) ) ) for (const row of makeRows(5)) { - await internalSdk.save(table._id!, row, config.user._id) + await internalSdk.save(table._id!, row, config.getUser()._id) } })