]> git.proxmox.com Git - pmg-log-tracker.git/blame - tests/tests_time_rfc3339.rs
tests: add rfc3339 timestamp test
[pmg-log-tracker.git] / tests / tests_time_rfc3339.rs
CommitLineData
bc64fc80
ML
1use std::fs::File;
2use std::io::BufReader;
3use std::process::Command;
4
5mod utils;
6
7#[test]
8fn after_queue_time_rfc3339_mixed() {
9 let output = Command::new(utils::log_tracker_path())
10 .arg("-vv")
11 .arg("-s")
12 .arg("2023-06-23 00:00:00")
13 .arg("-e")
14 .arg("2023-06-23 23:59:00")
15 .arg("-i")
16 .arg("tests/test_input_time_rfc3339_mixed")
17 .output()
18 .expect("failed to execute pmg-log-tracker");
19
20 let expected_file =
21 File::open("tests/test_output_time_rfc3339_mixed").expect("failed to open test_output");
22
23 let expected_output = BufReader::new(&expected_file);
24 let output_reader = BufReader::new(&output.stdout[..]);
25 utils::compare_output(output_reader, expected_output);
26}