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



##########
File path: libminifi/test/aws-tests/PutS3ObjectTests.cpp
##########
@@ -107,6 +107,17 @@ TEST_CASE_METHOD(PutS3ObjectTestsFixture, "Test required 
property not set", "[aw
   REQUIRE_THROWS_AS(test_controller.runSession(plan, true), 
minifi::Exception&);
 }
 
+TEST_CASE_METHOD(PutS3ObjectTestsFixture, "Test incomplete credentials in 
credentials service", "[awsS3Config]") {
+  setBucket();
+  plan->setProperty(aws_credentials_service, "Secret Key", "secret");
+  setCredentialsService();
+  REQUIRE_THROWS_AS(test_controller.runSession(plan, true), 
minifi::Exception&);
+  REQUIRE(verifyLogLinePresenceInPollTime(std::chrono::seconds(3), "AWS 
Credentials have not been set!"));
+
+  // Test that no invalid credentials file was set from previous properties
+  REQUIRE(!LogTestController::getInstance().contains("load configure file 
failed", std::chrono::seconds(0), std::chrono::milliseconds(0)));

Review comment:
       `REQUIRE_FALSE` might be used here




-- 
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:
us...@infra.apache.org


Reply via email to