Disable mssql test

This commit is contained in:
Adria Navarro 2024-07-08 21:22:03 +02:00
parent 5be8882122
commit 0f1c8eb788
1 changed files with 37 additions and 34 deletions

View File

@ -1437,42 +1437,45 @@ describe.each([
) )
}) })
it("should handle filtering by composite primary keys", async () => { // MSSQL needs a setting called IDENTITY_INSERT to be set to ON to allow writing
const tableRequest = saveTableRequest({ // to identity columns. This is not something Budibase does currently.
primary: ["number", "string"], providerType !== DatabaseName.SQL_SERVER &&
schema: { it("should handle filtering by composite primary keys", async () => {
string: { const tableRequest = saveTableRequest({
type: FieldType.STRING, primary: ["number", "string"],
name: "string", schema: {
string: {
type: FieldType.STRING,
name: "string",
},
number: {
type: FieldType.NUMBER,
name: "number",
},
}, },
number: { })
type: FieldType.NUMBER, delete tableRequest.schema.id
name: "number",
}, const table = await config.api.table.save(tableRequest)
},
const rows = await Promise.all(
generator
.unique(
() => ({
string: generator.word({ length: 30 }),
number: generator.integer({ min: 0, max: 10000 }),
}),
10
)
.map(d => config.api.row.save(table._id!, d))
)
const res = await config.api.row.exportRows(table._id!, {
rows: _.sampleSize(rows, 3).map(r => r._id!),
})
const results = JSON.parse(res)
expect(results.length).toEqual(3)
}) })
delete tableRequest.schema.id
const table = await config.api.table.save(tableRequest)
const rows = await Promise.all(
generator
.unique(
() => ({
string: generator.word({ length: 30 }),
number: generator.integer({ min: 0, max: 10000 }),
}),
10
)
.map(d => config.api.row.save(table._id!, d))
)
const res = await config.api.row.exportRows(table._id!, {
rows: _.sampleSize(rows, 3).map(r => r._id!),
})
const results = JSON.parse(res)
expect(results.length).toEqual(3)
})
}) })
let o2mTable: Table let o2mTable: Table