@@ -313,7 +313,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleWithoutRoleARN)
313
313
314
314
STSProfileCredentialsProvider credsProvider (" default" , roleSessionDuration, [](const AWSCredentials&) {
315
315
ADD_FAILURE () << " STS Service client should not be used in this scenario." ;
316
- return nullptr ;
316
+ return (STSClient*) nullptr ;
317
317
});
318
318
319
319
auto actualCredentials = credsProvider.GetAWSCredentials ();
@@ -383,7 +383,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleWithoutSourceProfile)
383
383
384
384
STSProfileCredentialsProvider credsProvider (" default" , roleSessionDuration, [](const AWSCredentials&) {
385
385
ADD_FAILURE () << " STS Service client should not be used in this scenario." ;
386
- return nullptr ;
386
+ return (STSClient*) nullptr ;
387
387
});
388
388
389
389
auto actualCredentials = credsProvider.GetAWSCredentials ();
@@ -409,7 +409,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleWithNonExistentSourceProfile
409
409
410
410
STSProfileCredentialsProvider credsProvider (" default" , roleSessionDuration, [](const AWSCredentials&) {
411
411
ADD_FAILURE () << " STS Service client should not be used in this scenario." ;
412
- return nullptr ;
412
+ return (STSClient*) nullptr ;
413
413
});
414
414
415
415
auto actualCredentials = credsProvider.GetAWSCredentials ();
@@ -556,7 +556,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleSelfReferencingSourceProfile
556
556
557
557
Model::AssumeRoleResult mockResult;
558
558
mockResult.SetCredentials (stsCredentials);
559
- Aws::UniquePtr <MockSTSClient> stsClient;
559
+ std::shared_ptr <MockSTSClient> stsClient;
560
560
561
561
int stsCallCounter = 0 ;
562
562
@@ -572,9 +572,9 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleSelfReferencingSourceProfile
572
572
EXPECT_STREQ (ACCESS_KEY_ID_2, creds.GetAWSAccessKeyId ().c_str ());
573
573
EXPECT_STREQ (SECRET_ACCESS_KEY_ID_2, creds.GetAWSSecretKey ().c_str ());
574
574
}
575
- stsClient = Aws::MakeUnique <MockSTSClient>(CLASS_TAG, creds);
575
+ stsClient = Aws::MakeShared <MockSTSClient>(CLASS_TAG, creds);
576
576
stsClient->MockAssumeRole (mockResult);
577
- return stsClient. get () ;
577
+ return stsClient;
578
578
});
579
579
580
580
auto actualCredentials = credsProvider.GetAWSCredentials ();
@@ -614,7 +614,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleRecursivelyCircularReference
614
614
615
615
STSProfileCredentialsProvider credsProvider (" default" , roleSessionDuration, [](const AWSCredentials&) {
616
616
ADD_FAILURE () << " STS Service client should not be used in this scenario." ;
617
- return nullptr ;
617
+ return (STSClient*) nullptr ;
618
618
});
619
619
620
620
auto actualCredentials = credsProvider.GetAWSCredentials ();
0 commit comments