fgerlits commented on code in PR #1812:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1812#discussion_r1631130551
##########
extensions/standard-processors/tests/unit/GetFileTests.cpp:
##########
@@ -292,3 +292,26 @@ TEST_CASE("GetFile sets attributes correctly") {
CHECK(flow_file->getAttribute(minifi::core::SpecialFlowAttribute::FILENAME) ==
"beta.txt");
}
}
+
+TEST_CASE("GetFile can use expression language in Directory property") {
+ using minifi::processors::GetFile;
+ LogTestController::getInstance().setTrace<GetFile>();
+
+ const auto get_file = std::make_shared<GetFile>("GetFile");
+ minifi::test::SingleProcessorTestController test_controller(get_file);
+
+ std::filesystem::path base_dir = test_controller.createTempDirectory();
+ auto date_str = date::format("%Y-%m-%d",
std::chrono::time_point_cast<std::chrono::seconds>(std::chrono::system_clock::now()));
Review Comment:
nitpicking, but why do we cast (from microseconds?) to seconds if we only
use the date part?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]