{
const int DLP_REPORT_TYPE = 1111;
const int PAD_REPORT_TYPE = 1112;
+ const int FIM_REPORT_TYPE = 1113;
}
namespace NMD
return;
}
- std::string report_type{ (type == PAD_REPORT_TYPE) ? "pad" : "dlp"};
- std::string log_type{ (type == PAD_REPORT_TYPE) ? "PAD" : "DLP"};
+ std::string report_type;
+ std::string log_type;
+ switch(type)
+ {
+ case DLP_REPORT_TYPE:
+ {
+ report_type = "dlp";
+ log_type = "DLP";
+ }
+ break;
+ case PAD_REPORT_TYPE:
+ {
+ report_type = "pad";
+ log_type = "PAD";
+ }
+ break;
+ default:
+ {
+ report_type = "fim";
+ log_type = "FIM";
+ }
+ break;
+ }
std::ostringstream os;
os << '[' << log_type << "] audit(" << time << '.' << ms << ":0) type=" << type << " text=" << text;
});
ASSERT_EQ(0, result) << "sendReport() error\n";
}
+
+/**
+ * Test for check FIM reports
+ * 1. Create RMI client and connect to report service
+ * 2. Call sendReport() method
+ * 3. Check result
+ * 4. Disconnect client
+ */
+TEST(DISABLED_test_report_service, fimReport)
+{
+ int result = -1;
+
+ ASSERT_NO_THROW({
+ rmi::Client client(ReportService::RMI_ADDRESS);
+ client.connect();
+ result = client.methodCall<int>("ReportService::sendReport",
+ std::string{"fim"},
+ std::string{"[FIM] operation=write gpa=7fffd19c5592 start_symbol=_text end_symbol=__start_rodata mode=debug"});
+ client.disconnect();
+ });
+ ASSERT_EQ(0, result) << "sendReport() error\n";
+}