Upgrade DefaultCredentialsProvider and AwsBasicCredentials to AWS SDK v2
This commit is contained in:
parent
c8f642b435
commit
f83f8c8e02
3 changed files with 6 additions and 6 deletions
|
|
@ -65,7 +65,7 @@ public class MultiLangDaemonConfigTest {
|
|||
String properties = String.format(
|
||||
"executableName = %s\n"
|
||||
+ "applicationName = %s\n"
|
||||
+ "AWSCredentialsProvider = DefaultAWSCredentialsProviderChain\n"
|
||||
+ "AWSCredentialsProvider = DefaultCredentialsProvider\n"
|
||||
+ "processingLanguage = malbolge\n"
|
||||
+ "regionName = %s\n",
|
||||
EXE, APPLICATION_NAME, "us-east-1");
|
||||
|
|
@ -182,7 +182,7 @@ public class MultiLangDaemonConfigTest {
|
|||
@Test
|
||||
public void testPropertyValidation() {
|
||||
String propertiesNoExecutableName = "applicationName = testApp \n" + "streamName = fakeStream \n"
|
||||
+ "AWSCredentialsProvider = DefaultAWSCredentialsProviderChain\n" + "processingLanguage = malbolge";
|
||||
+ "AWSCredentialsProvider = DefaultCredentialsProvider\n" + "processingLanguage = malbolge";
|
||||
ClassLoader classLoader = Mockito.mock(ClassLoader.class);
|
||||
|
||||
Mockito.doReturn(new ByteArrayInputStream(propertiesNoExecutableName.getBytes()))
|
||||
|
|
|
|||
|
|
@ -538,7 +538,7 @@ public class KinesisClientLibConfiguratorTest {
|
|||
public static class AlwaysSucceedCredentialsProviderKinesis implements AwsCredentialsProvider {
|
||||
@Override
|
||||
public AwsCredentials resolveCredentials() {
|
||||
return AwsBasicCredentials.create("", "");
|
||||
return AwsBasicCredentials.create("DUMMY_ACCESS_KEY_ID", "DUMMY_SECRET_ACCESS_KEY");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -548,7 +548,7 @@ public class KinesisClientLibConfiguratorTest {
|
|||
public static class AlwaysSucceedCredentialsProviderDynamoDB implements AwsCredentialsProvider {
|
||||
@Override
|
||||
public AwsCredentials resolveCredentials() {
|
||||
return AwsBasicCredentials.create("", "");
|
||||
return AwsBasicCredentials.create("DUMMY_ACCESS_KEY_ID", "DUMMY_SECRET_ACCESS_KEY");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -558,7 +558,7 @@ public class KinesisClientLibConfiguratorTest {
|
|||
public static class AlwaysSucceedCredentialsProviderCloudWatch implements AwsCredentialsProvider {
|
||||
@Override
|
||||
public AwsCredentials resolveCredentials() {
|
||||
return AwsBasicCredentials.create("", "");
|
||||
return AwsBasicCredentials.create("DUMMY_ACCESS_KEY_ID", "DUMMY_SECRET_ACCESS_KEY");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ applicationName = MultiLangTest
|
|||
# The DefaultAWSCredentialsProviderChain checks several other providers, which is
|
||||
# described here:
|
||||
# http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/DefaultAWSCredentialsProviderChain.html
|
||||
AWSCredentialsProvider = DefaultAWSCredentialsProviderChain
|
||||
AWSCredentialsProvider = DefaultCredentialsProvider
|
||||
|
||||
# Appended to the user agent of the KCL. Does not impact the functionality of the
|
||||
# KCL in any other way.
|
||||
|
|
|
|||
Loading…
Reference in a new issue