Disabling app migration tests and app migrations in test environment.

This commit is contained in:
mike12345567 2024-06-10 14:30:11 +01:00
parent 61746e043e
commit 8f6cfb7634
5 changed files with 5 additions and 5 deletions

View File

@ -82,7 +82,7 @@ beforeAll(async () => {
})
})
describe("SQS migration", () => {
xdescribe("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,7 +2,7 @@ import { context } from "@budibase/backend-core"
import * as setup from "../../api/routes/tests/utilities"
import * as migrations from "../migrations"
describe("migration integrity", () => {
xdescribe("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("each migration can rerun safely", async () => {

View File

@ -13,7 +13,7 @@ jest.mock<typeof migrations>("../migrations", () => ({
],
}))
describe("migrations", () => {
xdescribe("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("migrationsProcessor", () => {
xdescribe("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) {
if (env.DISABLE_APP_MIGRATIONS || env.isTest()) {
return next()
}