1
0
Fork 0
mirror of synced 2024-10-02 10:08:09 +13:00

Test invalid config

This commit is contained in:
Adria Navarro 2023-05-17 09:44:55 +02:00
parent 6b2e6f7bcb
commit 860a1ee271

View file

@ -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",
})
})
})
})