1
0
Fork 0
mirror of synced 2024-09-20 11:27:56 +12:00

Debugging view test failures.

This commit is contained in:
Sam Rose 2024-08-27 15:22:53 +01:00
parent 43560b3269
commit be0a14489b
No known key found for this signature in database
3 changed files with 10 additions and 8 deletions

View file

@ -59,13 +59,14 @@ export async function searchView(
} }
}) })
}) })
} else } else {
query = { query = {
$and: { $and: {
conditions: [query, body.query], conditions: [query, body.query],
}, },
} }
} }
}
await context.ensureSnippetContext(true) await context.ensureSnippetContext(true)

View file

@ -34,12 +34,12 @@ import sdk from "../../../sdk"
describe.each([ describe.each([
["lucene", undefined], ["lucene", undefined],
["sqs", undefined], // ["sqs", undefined],
[DatabaseName.POSTGRES, getDatasource(DatabaseName.POSTGRES)], // [DatabaseName.POSTGRES, getDatasource(DatabaseName.POSTGRES)],
[DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)], // [DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)],
[DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)], // [DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)],
[DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)], // [DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)],
[DatabaseName.ORACLE, getDatasource(DatabaseName.ORACLE)], // [DatabaseName.ORACLE, getDatasource(DatabaseName.ORACLE)],
])("/v2/views (%s)", (name, dsProvider) => { ])("/v2/views (%s)", (name, dsProvider) => {
const config = setup.getConfig() const config = setup.getConfig()
const isSqs = name === "sqs" const isSqs = name === "sqs"
@ -1491,7 +1491,7 @@ describe.each([
) )
}) })
it("can query on top of the view filters", async () => { it.only("can query on top of the view filters", async () => {
await config.api.row.save(table._id!, { await config.api.row.save(table._id!, {
one: "foo", one: "foo",
two: "bar", two: "bar",

View file

@ -3,6 +3,7 @@ import { tmpdir } from "os"
process.env.SELF_HOSTED = "1" process.env.SELF_HOSTED = "1"
process.env.NODE_ENV = "jest" process.env.NODE_ENV = "jest"
process.env.MULTI_TENANCY = "1" process.env.MULTI_TENANCY = "1"
process.env.APP_PORT = "0"
// @ts-ignore // @ts-ignore
process.env.BUDIBASE_DIR = tmpdir("budibase-unittests") process.env.BUDIBASE_DIR = tmpdir("budibase-unittests")
process.env.LOG_LEVEL = process.env.LOG_LEVEL || "error" process.env.LOG_LEVEL = process.env.LOG_LEVEL || "error"