1
0
Fork 0
mirror of synced 2024-10-05 20:44:47 +13:00

Updating app migration test to not create the app context, relying on the app migration processor to do this for us instead (including tenancy context).

This commit is contained in:
mike12345567 2024-06-10 13:55:26 +01:00
parent 9e3f476c65
commit aadf8ff3b3

View file

@ -16,7 +16,17 @@ import {
generateLinkID,
generateRowID,
} from "../../../db/utils"
import { processMigrations } from "../../migrationsProcessor"
import migration from "../20240604153647_initial_sqs"
import { AppMigration } from "src/appMigrations"
const MIGRATIONS: AppMigration[] = [
{
id: "20240604153647_initial_sqs",
func: migration,
disabled: false,
},
]
const config = setup.getConfig()
let tableId: string
@ -91,9 +101,7 @@ describe("SQS migration", () => {
expect(error.status).toBe(404)
})
await sqsEnabled(async () => {
await context.doInAppContext(config.appId!, async () => {
await migration()
})
await processMigrations(config.appId!, MIGRATIONS)
const designDoc = await db.get<SQLiteDefinition>(SQLITE_DESIGN_DOC_ID)
expect(designDoc.sql.tables).toBeDefined()
const mainTableDef = designDoc.sql.tables[tableId]