fixed test

This commit is contained in:
DustInDark
2022-06-23 22:11:56 +09:00
parent 8c377b2195
commit 0c6316d75b

View File

@@ -700,8 +700,7 @@ mod tests {
use crate::afterfact::emit_csv;
use crate::afterfact::format_time;
use crate::detections::print;
use crate::detections::print::DetectInfo;
use crate::detections::print::CH_CONFIG;
use crate::detections::print::{DetectInfo ,Message};
use chrono::{Local, TimeZone, Utc};
use hashbrown::HashMap;
use serde_json::Value;
@@ -717,6 +716,11 @@ mod tests {
}
fn test_emit_csv_output() {
let mock_ch_filter = Message::create_output_filter_config(
"config/channel_abbreviations.txt",
true,
false,
);
let test_filepath: &str = "test.evtx";
let test_rulepath: &str = "test-rule.yml";
let test_title = "test_title";
@@ -755,7 +759,7 @@ mod tests {
level: test_level.to_string(),
computername: test_computername.to_string(),
eventid: test_eventid.to_string(),
channel: CH_CONFIG
channel: mock_ch_filter
.get("Security")
.unwrap_or(&String::default())
.to_string(),