[pmg-devel] [PATCH v2 pmg-log-tracker 3/3] add test for the exclude_greylist fix
Mira Limbeck
m.limbeck at proxmox.com
Fri Mar 20 13:08:29 CET 2020
This tests the before queue case with both '-g' and 'n' options set.
Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
---
tests/tests_before_queue.rs | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/tests/tests_before_queue.rs b/tests/tests_before_queue.rs
index 2c3ef8d..a1ea89b 100644
--- a/tests/tests_before_queue.rs
+++ b/tests/tests_before_queue.rs
@@ -113,3 +113,26 @@ fn before_queue_search_string() {
let output_reader = BufReader::new(&output.stdout[..]);
utils::compare_output(expected_output, output_reader);
}
+
+#[test]
+fn before_queue_exclude_greylist_ndr() {
+ let output = Command::new(utils::log_tracker_path())
+ .arg("-vv")
+ .arg("-s")
+ .arg("1608300000")
+ .arg("-e")
+ .arg("1608302400")
+ .arg("-i")
+ .arg("tests/test_input_mixed")
+ .arg("-g")
+ .arg("-n")
+ .output()
+ .expect("failed to execute pmg-log-tracker");
+
+ let expected_file = File::open("tests/test_output_before_queue")
+ .expect("failed to open test_output");
+
+ let expected_output = BufReader::new(&expected_file);
+ let output_reader = BufReader::new(&output.stdout[..]);
+ utils::compare_output(expected_output, output_reader);
+}
--
2.20.1
More information about the pmg-devel
mailing list