From d893fdf6cff661c1a0a6610a62783debba6a2791 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 15 May 2023 17:40:40 +0200 Subject: [PATCH] Test wrong endpoint --- qa-core/src/integrations/validators/s3.spec.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qa-core/src/integrations/validators/s3.spec.ts b/qa-core/src/integrations/validators/s3.spec.ts index bd76bea26a..57c2377c76 100644 --- a/qa-core/src/integrations/validators/s3.spec.ts +++ b/qa-core/src/integrations/validators/s3.spec.ts @@ -33,5 +33,20 @@ describe("datasource validators", () => { const result = await integration.testConnection() expect(result).toBe(true) }) + + it("test wrong endpoint", async () => { + const integration = new s3.integration({ + region: "eu-west-2", + accessKeyId: "testkey", + secretAccessKey: "testsecret", + s3ForcePathStyle: false, + endpoint: `http://wrong:123`, + }) + const result = await integration.testConnection() + expect(result).toEqual({ + error: + "Inaccessible host: `wrong' at port `undefined'. This service may not be available in the `eu-west-2' region.", + }) + }) }) })