Bringing app migration tests back.

This commit is contained in:
mike12345567 2024-06-10 17:18:27 +01:00
parent 1bd5a41712
commit 8665737dcb
5 changed files with 6 additions and 6 deletions

View File

@ -82,7 +82,7 @@ beforeAll(async () => {
})
})
describe.skip("SQS migration", () => {
describe("SQS migration", () => {
it("test migration runs as expected against an older DB", async () => {
const db = dbCore.getDB(config.appId!)
// confirm nothing exists initially

View File

@ -2,10 +2,10 @@ import { context } from "@budibase/backend-core"
import * as setup from "../../api/routes/tests/utilities"
import * as migrations from "../migrations"
describe.skip("migration integrity", () => {
describe("migration integrity", () => {
// These test is checking that each migration is "idempotent".
// We should be able to rerun any migration, with any rerun not modifiying anything. The code should be aware that the migration already ran
it.skip("each migration can rerun safely", async () => {
it("each migration can rerun safely", async () => {
const config = setup.getConfig()
await config.init()

View File

@ -13,7 +13,7 @@ jest.mock<typeof migrations>("../migrations", () => ({
],
}))
describe.skip("migrations", () => {
describe("migrations", () => {
it("new apps are created with the latest app migration version set", async () => {
const config = setup.getConfig()
await config.init()

View File

@ -6,7 +6,7 @@ import { AppMigration } from ".."
const futureTimestamp = `20500101174029`
describe.skip("migrationsProcessor", () => {
describe("migrationsProcessor", () => {
it("running migrations will update the latest applied migration", async () => {
const testMigrations: AppMigration[] = [
{ id: `${futureTimestamp}_123`, func: async () => {} },

View File

@ -7,7 +7,7 @@ export default async (ctx: UserCtx, next: any) => {
// migrations can be disabled via environment variable if you
// need to completely disable migrations, e.g. for testing
if (env.DISABLE_APP_MIGRATIONS || env.isTest()) {
if (env.DISABLE_APP_MIGRATIONS) {
return next()
}