22
33import static com .amazonaws .SDKGlobalConfiguration .ACCESS_KEY_SYSTEM_PROPERTY ;
44import static com .amazonaws .SDKGlobalConfiguration .SECRET_KEY_SYSTEM_PROPERTY ;
5- import static com .upplication .s3fs .AmazonS3Factory .ACCESS_KEY ;
6- import static com .upplication .s3fs .AmazonS3Factory .CONNECTION_TIMEOUT ;
7- import static com .upplication .s3fs .AmazonS3Factory .MAX_CONNECTIONS ;
8- import static com .upplication .s3fs .AmazonS3Factory .MAX_ERROR_RETRY ;
9- import static com .upplication .s3fs .AmazonS3Factory .PROTOCOL ;
10- import static com .upplication .s3fs .AmazonS3Factory .PROXY_DOMAIN ;
11- import static com .upplication .s3fs .AmazonS3Factory .PROXY_HOST ;
12- import static com .upplication .s3fs .AmazonS3Factory .PROXY_PASSWORD ;
13- import static com .upplication .s3fs .AmazonS3Factory .PROXY_PORT ;
14- import static com .upplication .s3fs .AmazonS3Factory .PROXY_USERNAME ;
15- import static com .upplication .s3fs .AmazonS3Factory .PROXY_WORKSTATION ;
16- import static com .upplication .s3fs .AmazonS3Factory .REQUEST_METRIC_COLLECTOR_CLASS ;
17- import static com .upplication .s3fs .AmazonS3Factory .SECRET_KEY ;
18- import static com .upplication .s3fs .AmazonS3Factory .SOCKET_RECEIVE_BUFFER_SIZE_HINT ;
19- import static com .upplication .s3fs .AmazonS3Factory .SOCKET_SEND_BUFFER_SIZE_HINT ;
20- import static com .upplication .s3fs .AmazonS3Factory .SOCKET_TIMEOUT ;
21- import static com .upplication .s3fs .AmazonS3Factory .USER_AGENT ;
5+ import static com .upplication .s3fs .AmazonS3Factory .*;
226import static org .junit .Assert .assertEquals ;
237import static org .junit .Assert .assertNull ;
248import static org .junit .Assert .assertTrue ;
@@ -58,6 +42,7 @@ public void neverTrustTheDefaults() {
5842 props .setProperty (SOCKET_RECEIVE_BUFFER_SIZE_HINT , "49000" );
5943 props .setProperty (SOCKET_TIMEOUT , "30" );
6044 props .setProperty (USER_AGENT , "I-am-Groot" );
45+ props .setProperty (SIGNER_OVERRIDE , "S3SignerType" );
6146 ExposingAmazonS3Client client = (ExposingAmazonS3Client ) clientFactory .getAmazonS3 (S3EndpointConstant .S3_GLOBAL_URI_TEST , props );
6247 AWSCredentialsProvider credentialsProvider = client .getAWSCredentialsProvider ();
6348 AWSCredentials credentials = credentialsProvider .getCredentials ();
@@ -79,6 +64,7 @@ public void neverTrustTheDefaults() {
7964 assertEquals (49000 , clientConfiguration .getSocketBufferSizeHints ()[1 ]);
8065 assertEquals (30 , clientConfiguration .getSocketTimeout ());
8166 assertEquals ("I-am-Groot" , clientConfiguration .getUserAgent ());
67+ assertEquals ("S3SignerType" , clientConfiguration .getSignerOverride ());
8268 }
8369
8470 @ Test
@@ -108,6 +94,7 @@ public void theDefaults() {
10894 assertEquals (0 , clientConfiguration .getSocketBufferSizeHints ()[1 ]);
10995 assertEquals (50000 , clientConfiguration .getSocketTimeout ());
11096 assertTrue (clientConfiguration .getUserAgent ().startsWith ("aws-sdk-java" ));
97+ assertNull (clientConfiguration .getSignerOverride ());
11198 }
11299
113100 @ Test (expected = IllegalArgumentException .class )
0 commit comments