fgerlits commented on a change in pull request #1070:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1070#discussion_r630002339



##########
File path: libminifi/test/aws-tests/AWSCredentialsServiceTest.cpp
##########
@@ -53,14 +53,14 @@ TEST_CASE_METHOD(AWSCredentialsServiceTestAccessor, "Test 
expired credentials ar
   auto aws_credentials_impl = 
std::static_pointer_cast<minifi::aws::controllers::AWSCredentialsService>(aws_credentials_service->getControllerServiceImplementation());
 
   // Check intial credentials
-  REQUIRE(aws_credentials_impl->getAWSCredentials().GetAWSAccessKeyId() == 
"key");
-  REQUIRE(aws_credentials_impl->getAWSCredentials().GetAWSSecretKey() == 
"secret");
-  REQUIRE(!aws_credentials_impl->getAWSCredentials().IsExpired());
+  REQUIRE(aws_credentials_impl->getAWSCredentials()->GetAWSAccessKeyId() == 
"key");

Review comment:
       I would put a `REQUIRE(aws_credentials_impl->getAWSCredentials())` 
before this line, so we get a test failure rather than undefined behavior if 
the credentials do not exist.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to