From ca52cf8b289da667f36cba2e1ee5e034d14d4b96 Mon Sep 17 00:00:00 2001 From: Leon Stein Date: Wed, 29 Dec 2021 08:41:00 -0500 Subject: [PATCH] add aws s3 custom endpoint config test Signed-off-by: Leon Stein --- packages/integration/src/awsS3/config.test.ts | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/integration/src/awsS3/config.test.ts b/packages/integration/src/awsS3/config.test.ts index 6fcbfc9964..4885a41a2a 100644 --- a/packages/integration/src/awsS3/config.test.ts +++ b/packages/integration/src/awsS3/config.test.ts @@ -26,10 +26,9 @@ describe('readAwsS3IntegrationConfig', () => { return new ConfigReader(data); } - it('reads all values', () => { + it('reads all values (default)', () => { const output = readAwsS3IntegrationConfig( buildConfig({ - host: 'amazonaws.com', accessKeyId: 'fake-key', secretAccessKey: 'fake-secret-key', }), @@ -41,6 +40,23 @@ describe('readAwsS3IntegrationConfig', () => { secretAccessKey: 'fake-secret-key', }); }); + it('reads all values (endpoint)', () => { + const output = readAwsS3IntegrationConfig( + buildConfig({ + endpoint: 'http://localhost:4566', + s3ForcePathStyle: true, + accessKeyId: 'fake-key', + secretAccessKey: 'fake-secret-key', + }), + ); + expect(output).toEqual({ + host: 'localhost:4566', + endpoint: 'http://localhost:4566', + s3ForcePathStyle: true, + accessKeyId: 'fake-key', + secretAccessKey: 'fake-secret-key', + }); + }); }); describe('readAwsS3IntegrationConfigs', () => {