Test happy path
This commit is contained in:
parent
896bc61934
commit
6b2e6f7bcb
|
@ -0,0 +1,23 @@
|
|||
import { ElasticsearchContainer } from "testcontainers"
|
||||
import elastic from "../../../../packages/server/src/integrations/elasticsearch"
|
||||
|
||||
jest.unmock("@elastic/elasticsearch")
|
||||
|
||||
describe("datasource validators", () => {
|
||||
describe("elastic search", () => {
|
||||
let url: string
|
||||
|
||||
beforeAll(async () => {
|
||||
const container = await new ElasticsearchContainer().start()
|
||||
url = container.getHttpUrl()
|
||||
})
|
||||
|
||||
it("test valid connection string", async () => {
|
||||
const integration = new elastic.integration({
|
||||
url,
|
||||
})
|
||||
const result = await integration.testConnection()
|
||||
expect(result).toEqual({ connected: true })
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue