fix tests
This commit is contained in:
parent
59197bcaec
commit
a3626986a1
|
@ -169,6 +169,7 @@ describe("/queries", () => {
|
|||
parameters: {},
|
||||
fields: {},
|
||||
queryVerb: "read",
|
||||
name: datasource.name,
|
||||
})
|
||||
.set(config.defaultHeaders())
|
||||
.expect("Content-Type", /json/)
|
||||
|
@ -261,9 +262,13 @@ describe("/queries", () => {
|
|||
})
|
||||
|
||||
it("check that it automatically retries on fail with cached dynamics", async () => {
|
||||
const { datasource, query: base } = await config.dynamicVariableDatasource()
|
||||
const { datasource, query: base } =
|
||||
await config.dynamicVariableDatasource()
|
||||
// preview once to cache
|
||||
await preview(datasource, { path: "www.google.com", queryString: "test={{ variable3 }}" })
|
||||
await preview(datasource, {
|
||||
path: "www.google.com",
|
||||
queryString: "test={{ variable3 }}",
|
||||
})
|
||||
// check its in cache
|
||||
const contents = await checkCacheForDynamicVariable(base._id, "variable3")
|
||||
expect(contents.rows.length).toEqual(1)
|
||||
|
@ -276,9 +281,13 @@ describe("/queries", () => {
|
|||
})
|
||||
|
||||
it("deletes variables when linked query is deleted", async () => {
|
||||
const { datasource, query: base } = await config.dynamicVariableDatasource()
|
||||
const { datasource, query: base } =
|
||||
await config.dynamicVariableDatasource()
|
||||
// preview once to cache
|
||||
await preview(datasource, { path: "www.google.com", queryString: "test={{ variable3 }}" })
|
||||
await preview(datasource, {
|
||||
path: "www.google.com",
|
||||
queryString: "test={{ variable3 }}",
|
||||
})
|
||||
// check its in cache
|
||||
let contents = await checkCacheForDynamicVariable(base._id, "variable3")
|
||||
expect(contents.rows.length).toEqual(1)
|
||||
|
|
|
@ -393,6 +393,7 @@ class TestConfiguration {
|
|||
parameters: {},
|
||||
fields,
|
||||
queryVerb: "read",
|
||||
name: datasource.name,
|
||||
})
|
||||
.set(config.defaultHeaders())
|
||||
.expect("Content-Type", /json/)
|
||||
|
|
Loading…
Reference in New Issue