Correct use of dsProvider in elasticsearch.spec.ts.
This commit is contained in:
parent
4bd6158f19
commit
48674833fc
|
@ -1,20 +1,20 @@
|
||||||
import { Datasource } from "@budibase/types"
|
import { Datasource } from "@budibase/types"
|
||||||
import { ElasticsearchConfig, ElasticSearchIntegration } from "../elasticsearch"
|
import { ElasticsearchConfig, ElasticSearchIntegration } from "../elasticsearch"
|
||||||
import * as elasticsearch from "../tests/utils/elasticsearch"
|
|
||||||
import { generator } from "@budibase/backend-core/tests"
|
import { generator } from "@budibase/backend-core/tests"
|
||||||
import { DatabaseName, datasourceDescribe } from "./utils"
|
import { DatabaseName, datasourceDescribe } from "./utils"
|
||||||
|
|
||||||
const describes = datasourceDescribe({ only: [DatabaseName.ELASTICSEARCH] })
|
const describes = datasourceDescribe({ only: [DatabaseName.ELASTICSEARCH] })
|
||||||
|
|
||||||
if (describes.length) {
|
if (describes.length) {
|
||||||
describe.each(describes)("Elasticsearch Integration", () => {
|
describe.each(describes)("Elasticsearch Integration", ({ dsProvider }) => {
|
||||||
let datasource: Datasource
|
let datasource: Datasource
|
||||||
let integration: ElasticSearchIntegration
|
let integration: ElasticSearchIntegration
|
||||||
|
|
||||||
let index: string
|
let index: string
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
datasource = await elasticsearch.getDatasource()
|
const ds = await dsProvider()
|
||||||
|
datasource = ds.datasource!
|
||||||
})
|
})
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
Loading…
Reference in New Issue