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:
parent
9e3f476c65
commit
aadf8ff3b3
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue