adamdebreceni commented on code in PR #1564:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1564#discussion_r1211368037
##########
extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp:
##########
@@ -65,6 +65,28 @@ class SimpleFormatTestController : public
OutputFormatTestController {
}
};
+class LogFileTestController : public OutputFormatTestController {
+ public:
+ LogFileTestController(): OutputFormatTestController("", "*", "JSON",
"Simple") {
+ log_file_ = createTempDirectory() / "cwel-events.evtx";
+ channel_ = "SavedLog:" + log_file_.string();
+ }
+
+ protected:
+ void dispatchBookmarkEvent() override {
+ reportEvent(APPLICATION_CHANNEL, "Event zero from file: this is in the
past");
+ generateLogFile(std::wstring{APPLICATION_CHANNEL.begin(),
APPLICATION_CHANNEL.end()}, log_file_);
Review Comment:
`APPLICATION_CHANNEL` is `std::wstring` in `BookmarkTests.cpp` and
`std::string` in this file, there are also two different `reportEvent`
implementations, this should be revisited to unify these
##########
extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp:
##########
@@ -527,4 +549,24 @@ TEST_CASE("ConsumeWindowsEventLog Simple JSON works with
UserData", "[cwel][json
}
}
+TEST_CASE("ConsumeWindowsEventLog can process events from a log file",
"[cwel][logfile]") {
+ std::string event = LogFileTestController{}.run();
+ std::cout << "Event: " << event << std::endl;
Review Comment:
removed
--
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]