diff --git a/qa-core/src/integrations/validators/elastic.spec.ts b/qa-core/src/integrations/validators/elastic.spec.ts new file mode 100644 index 0000000000..61e4ed00f5 --- /dev/null +++ b/qa-core/src/integrations/validators/elastic.spec.ts @@ -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 }) + }) + }) +})