@@ -313,7 +313,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleWithoutRoleARN)
313313
314314 STSProfileCredentialsProvider credsProvider (" default" , roleSessionDuration, [](const AWSCredentials&) {
315315 ADD_FAILURE () << " STS Service client should not be used in this scenario." ;
316- return nullptr ;
316+ return (STSClient*) nullptr ;
317317 });
318318
319319 auto actualCredentials = credsProvider.GetAWSCredentials ();
@@ -383,7 +383,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleWithoutSourceProfile)
383383
384384 STSProfileCredentialsProvider credsProvider (" default" , roleSessionDuration, [](const AWSCredentials&) {
385385 ADD_FAILURE () << " STS Service client should not be used in this scenario." ;
386- return nullptr ;
386+ return (STSClient*) nullptr ;
387387 });
388388
389389 auto actualCredentials = credsProvider.GetAWSCredentials ();
@@ -409,7 +409,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleWithNonExistentSourceProfile
409409
410410 STSProfileCredentialsProvider credsProvider (" default" , roleSessionDuration, [](const AWSCredentials&) {
411411 ADD_FAILURE () << " STS Service client should not be used in this scenario." ;
412- return nullptr ;
412+ return (STSClient*) nullptr ;
413413 });
414414
415415 auto actualCredentials = credsProvider.GetAWSCredentials ();
@@ -556,7 +556,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleSelfReferencingSourceProfile
556556
557557 Model::AssumeRoleResult mockResult;
558558 mockResult.SetCredentials (stsCredentials);
559- Aws::UniquePtr <MockSTSClient> stsClient;
559+ std::shared_ptr <MockSTSClient> stsClient;
560560
561561 int stsCallCounter = 0 ;
562562
@@ -572,9 +572,9 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleSelfReferencingSourceProfile
572572 EXPECT_STREQ (ACCESS_KEY_ID_2, creds.GetAWSAccessKeyId ().c_str ());
573573 EXPECT_STREQ (SECRET_ACCESS_KEY_ID_2, creds.GetAWSSecretKey ().c_str ());
574574 }
575- stsClient = Aws::MakeUnique <MockSTSClient>(CLASS_TAG, creds);
575+ stsClient = Aws::MakeShared <MockSTSClient>(CLASS_TAG, creds);
576576 stsClient->MockAssumeRole (mockResult);
577- return stsClient. get () ;
577+ return stsClient;
578578 });
579579
580580 auto actualCredentials = credsProvider.GetAWSCredentials ();
@@ -614,7 +614,7 @@ TEST_F(STSProfileCredentialsProviderTest, AssumeRoleRecursivelyCircularReference
614614
615615 STSProfileCredentialsProvider credsProvider (" default" , roleSessionDuration, [](const AWSCredentials&) {
616616 ADD_FAILURE () << " STS Service client should not be used in this scenario." ;
617- return nullptr ;
617+ return (STSClient*) nullptr ;
618618 });
619619
620620 auto actualCredentials = credsProvider.GetAWSCredentials ();
0 commit comments