Disabling app migration tests and app migrations in test environment.
This commit is contained in:
parent
61746e043e
commit
8f6cfb7634
|
@ -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
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 () => {} },
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue