1
0
Fork 0
mirror of synced 2024-07-03 21:40:55 +12:00

Test wrong endpoint

This commit is contained in:
Adria Navarro 2023-05-15 17:40:40 +02:00
parent 1e505791c0
commit d893fdf6cf

View file

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