From 5b5c25248eeba237463aa35e5acf9afd80c5ec80 Mon Sep 17 00:00:00 2001 From: Alex Lisle Date: Thu, 29 Nov 2018 13:15:41 -0800 Subject: [PATCH] Fixed the broken unit tests. --- src/outputs/mod.rs | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/outputs/mod.rs b/src/outputs/mod.rs index eba4be8..1d61a94 100644 --- a/src/outputs/mod.rs +++ b/src/outputs/mod.rs @@ -79,6 +79,8 @@ pub fn create(config : &Config) -> Result>, String> { #[cfg(test)] mod tests { use std::net::{ Ipv4Addr, TcpListener, UdpSocket }; + use enums; + use filters; #[test] fn test_create_failed() { @@ -94,10 +96,20 @@ mod tests { port: 7233 }); - let config = super::OutputsConfig { - syslog: Some(vec), - elasticsearch: None, - notrust_endpoint: None, + let config = enums::Config { + directory: None, + name: None, + uuid: None, + outputs: super::OutputsConfig { + syslog: Some(vec), + elasticsearch: None, + notrust_endpoint: None, + }, + filters: filters::FiltersConfig { + non_process_connections : false, + dns_requests: false, + notrust_track_connections : false + } }; let config = super::create(&config); @@ -119,10 +131,21 @@ mod tests { address : Ipv4Addr::new(127, 0, 0, 1), port: 7232 }); - let config = super::OutputsConfig { - syslog: Some(vec), - elasticsearch: None, - notrust_endpoint: None, + + let config = enums::Config { + directory: None, + name: None, + uuid: None, + outputs: super::OutputsConfig { + syslog: Some(vec), + elasticsearch: None, + notrust_endpoint: None, + }, + filters: filters::FiltersConfig { + non_process_connections : false, + dns_requests: false, + notrust_track_connections : false + } }; let config = super::create(&config);