From 0c6316d75b33a02935e4c96646eb331aa792de09 Mon Sep 17 00:00:00 2001 From: DustInDark Date: Thu, 23 Jun 2022 22:11:56 +0900 Subject: [PATCH] fixed test --- src/afterfact.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/afterfact.rs b/src/afterfact.rs index 87c7db0d..246c37e1 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -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(),