use of software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider in project flink by apache.
the class AWSAsyncSinkUtilTest method testCreateKinesisAsyncClient.
@Test
public void testCreateKinesisAsyncClient() {
Properties properties = TestUtil.properties(AWS_REGION, "eu-west-2");
MockAsyncClientBuilder builder = mockKinesisAsyncClientBuilder();
ClientOverrideConfiguration clientOverrideConfiguration = ClientOverrideConfiguration.builder().build();
SdkAsyncHttpClient httpClient = NettyNioAsyncHttpClient.builder().build();
AWSAsyncSinkUtil.createAwsAsyncClient(properties, builder, httpClient, clientOverrideConfiguration);
verify(builder).overrideConfiguration(clientOverrideConfiguration);
verify(builder).httpClient(httpClient);
verify(builder).region(Region.of("eu-west-2"));
verify(builder).credentialsProvider(argThat(cp -> cp instanceof DefaultCredentialsProvider));
verify(builder, never()).endpointOverride(any());
}
use of software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider in project flink by apache.
the class AWSGeneralUtilTest method testGetCredentialsProviderAuto.
@Test
public void testGetCredentialsProviderAuto() {
Properties properties = TestUtil.properties(AWS_CREDENTIALS_PROVIDER, "AUTO");
AwsCredentialsProvider credentialsProvider = AWSGeneralUtil.getCredentialsProvider(properties);
assertTrue(credentialsProvider instanceof DefaultCredentialsProvider);
}
use of software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider in project flink by apache.
the class AWSGeneralUtilTest method testGetCredentialsProviderFromMap.
@Test
public void testGetCredentialsProviderFromMap() {
Map<String, Object> config = ImmutableMap.of(AWS_CREDENTIALS_PROVIDER, "AUTO");
AwsCredentialsProvider credentialsProvider = AWSGeneralUtil.getCredentialsProvider(config);
assertTrue(credentialsProvider instanceof DefaultCredentialsProvider);
}
Aggregations