fixed test
This commit is contained in:
@@ -700,8 +700,7 @@ mod tests {
|
|||||||
use crate::afterfact::emit_csv;
|
use crate::afterfact::emit_csv;
|
||||||
use crate::afterfact::format_time;
|
use crate::afterfact::format_time;
|
||||||
use crate::detections::print;
|
use crate::detections::print;
|
||||||
use crate::detections::print::DetectInfo;
|
use crate::detections::print::{DetectInfo ,Message};
|
||||||
use crate::detections::print::CH_CONFIG;
|
|
||||||
use chrono::{Local, TimeZone, Utc};
|
use chrono::{Local, TimeZone, Utc};
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
@@ -717,6 +716,11 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn test_emit_csv_output() {
|
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_filepath: &str = "test.evtx";
|
||||||
let test_rulepath: &str = "test-rule.yml";
|
let test_rulepath: &str = "test-rule.yml";
|
||||||
let test_title = "test_title";
|
let test_title = "test_title";
|
||||||
@@ -755,7 +759,7 @@ mod tests {
|
|||||||
level: test_level.to_string(),
|
level: test_level.to_string(),
|
||||||
computername: test_computername.to_string(),
|
computername: test_computername.to_string(),
|
||||||
eventid: test_eventid.to_string(),
|
eventid: test_eventid.to_string(),
|
||||||
channel: CH_CONFIG
|
channel: mock_ch_filter
|
||||||
.get("Security")
|
.get("Security")
|
||||||
.unwrap_or(&String::default())
|
.unwrap_or(&String::default())
|
||||||
.to_string(),
|
.to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user