Fix migration test.
This commit is contained in:
parent
8c890af814
commit
707da3864b
|
@ -18,7 +18,7 @@ import {
|
||||||
} from "../../../db/utils"
|
} from "../../../db/utils"
|
||||||
import { processMigrations } from "../../migrationsProcessor"
|
import { processMigrations } from "../../migrationsProcessor"
|
||||||
import migration from "../20240604153647_initial_sqs"
|
import migration from "../20240604153647_initial_sqs"
|
||||||
import { AppMigration } from "src/appMigrations"
|
import { AppMigration, updateAppMigrationMetadata } from "../../"
|
||||||
import sdk from "../../../sdk"
|
import sdk from "../../../sdk"
|
||||||
|
|
||||||
const MIGRATIONS: AppMigration[] = [
|
const MIGRATIONS: AppMigration[] = [
|
||||||
|
@ -90,6 +90,15 @@ describe("SQS migration", () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await config.doInTenant(async () => {
|
||||||
|
await updateAppMigrationMetadata({
|
||||||
|
appId: config.getAppId(),
|
||||||
|
version: "",
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
it("test migration runs as expected against an older DB", async () => {
|
it("test migration runs as expected against an older DB", async () => {
|
||||||
const db = dbCore.getDB(config.appId!)
|
const db = dbCore.getDB(config.appId!)
|
||||||
// confirm nothing exists initially
|
// confirm nothing exists initially
|
||||||
|
|
Loading…
Reference in New Issue