Merge branch 'master' into fix/aws-session-token-s3-ver2
This commit is contained in:
commit
61746e043e
|
@ -1,10 +1,6 @@
|
||||||
import * as setup from "../../../api/routes/tests/utilities"
|
import * as setup from "../../../api/routes/tests/utilities"
|
||||||
import { basicTable } from "../../../tests/utilities/structures"
|
import { basicTable } from "../../../tests/utilities/structures"
|
||||||
import {
|
import { db as dbCore, SQLITE_DESIGN_DOC_ID } from "@budibase/backend-core"
|
||||||
db as dbCore,
|
|
||||||
SQLITE_DESIGN_DOC_ID,
|
|
||||||
context,
|
|
||||||
} from "@budibase/backend-core"
|
|
||||||
import {
|
import {
|
||||||
LinkDocument,
|
LinkDocument,
|
||||||
DocumentType,
|
DocumentType,
|
||||||
|
@ -16,7 +12,17 @@ import {
|
||||||
generateLinkID,
|
generateLinkID,
|
||||||
generateRowID,
|
generateRowID,
|
||||||
} from "../../../db/utils"
|
} from "../../../db/utils"
|
||||||
|
import { processMigrations } from "../../migrationsProcessor"
|
||||||
import migration from "../20240604153647_initial_sqs"
|
import migration from "../20240604153647_initial_sqs"
|
||||||
|
import { AppMigration } from "src/appMigrations"
|
||||||
|
|
||||||
|
const MIGRATIONS: AppMigration[] = [
|
||||||
|
{
|
||||||
|
id: "20240604153647_initial_sqs",
|
||||||
|
func: migration,
|
||||||
|
disabled: false,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
const config = setup.getConfig()
|
const config = setup.getConfig()
|
||||||
let tableId: string
|
let tableId: string
|
||||||
|
@ -91,9 +97,7 @@ describe("SQS migration", () => {
|
||||||
expect(error.status).toBe(404)
|
expect(error.status).toBe(404)
|
||||||
})
|
})
|
||||||
await sqsEnabled(async () => {
|
await sqsEnabled(async () => {
|
||||||
await context.doInAppContext(config.appId!, async () => {
|
await processMigrations(config.appId!, MIGRATIONS)
|
||||||
await migration()
|
|
||||||
})
|
|
||||||
const designDoc = await db.get<SQLiteDefinition>(SQLITE_DESIGN_DOC_ID)
|
const designDoc = await db.get<SQLiteDefinition>(SQLITE_DESIGN_DOC_ID)
|
||||||
expect(designDoc.sql.tables).toBeDefined()
|
expect(designDoc.sql.tables).toBeDefined()
|
||||||
const mainTableDef = designDoc.sql.tables[tableId]
|
const mainTableDef = designDoc.sql.tables[tableId]
|
||||||
|
|
Loading…
Reference in New Issue