add aws s3 custom endpoint config test
Signed-off-by: Leon Stein <leons727@gmail.com>
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user