add aws s3 custom endpoint config test

Signed-off-by: Leon Stein <leons727@gmail.com>
This commit is contained in:
Leon Stein
2021-12-29 08:41:00 -05:00
parent 0dd1971d4a
commit ca52cf8b28
+18 -2
View File
@@ -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', () => {