1
0
Fork 0
mirror of synced 2024-09-20 11:27:56 +12:00

Fix migration test.

This commit is contained in:
Sam Rose 2024-08-27 15:46:16 +01:00
parent 8c890af814
commit 707da3864b
No known key found for this signature in database

View file

@ -18,7 +18,7 @@ import {
} from "../../../db/utils"
import { processMigrations } from "../../migrationsProcessor"
import migration from "../20240604153647_initial_sqs"
import { AppMigration } from "src/appMigrations"
import { AppMigration, updateAppMigrationMetadata } from "../../"
import sdk from "../../../sdk"
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 () => {
const db = dbCore.getDB(config.appId!)
// confirm nothing exists initially