From 860a1ee27178ca26d4e52122e9f1a47688b0d6d2 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 17 May 2023 09:44:55 +0200 Subject: [PATCH] Test invalid config --- qa-core/src/integrations/validators/elastic.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qa-core/src/integrations/validators/elastic.spec.ts b/qa-core/src/integrations/validators/elastic.spec.ts index 61e4ed00f5..39fd732744 100644 --- a/qa-core/src/integrations/validators/elastic.spec.ts +++ b/qa-core/src/integrations/validators/elastic.spec.ts @@ -19,5 +19,16 @@ describe("datasource validators", () => { const result = await integration.testConnection() expect(result).toEqual({ connected: true }) }) + + it("test wrong connection string", async () => { + const integration = new elastic.integration({ + url: `http://localhost:5656`, + }) + const result = await integration.testConnection() + expect(result).toEqual({ + connected: false, + error: "connect ECONNREFUSED 127.0.0.1:5656", + }) + }) }) })