mirror of
https://git.proxmox.com/git/pmg-log-tracker
synced 2025-04-28 13:03:18 +00:00
tests: explicitly set timezone for testcases with unix timestamps
noticed when building with sbuild, which uses UTC as timezone: Due to the parsing of traditional syslog time information (which does not contain timezone information) the testcases passing unix-timestamps as arguments failed. Explicitly setting TZ to Europe/Vienna fixes the tests (and makes the assumption visible) Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
5ed9f5caa5
commit
b154004956
@ -30,6 +30,7 @@ fn after_queue_start_end_time_string() {
|
||||
#[test]
|
||||
fn after_queue_start_end_timestamp() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -53,6 +54,7 @@ fn after_queue_start_end_timestamp() {
|
||||
#[test]
|
||||
fn after_queue_qid() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -78,6 +80,7 @@ fn after_queue_qid() {
|
||||
#[test]
|
||||
fn after_queue_host() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -103,6 +106,7 @@ fn after_queue_host() {
|
||||
#[test]
|
||||
fn after_queue_search_string() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -128,6 +132,7 @@ fn after_queue_search_string() {
|
||||
#[test]
|
||||
fn after_queue_search_string_case_insensitive() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -153,6 +158,7 @@ fn after_queue_search_string_case_insensitive() {
|
||||
#[test]
|
||||
fn after_queue_relay_before_lmtp() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -176,6 +182,7 @@ fn after_queue_relay_before_lmtp() {
|
||||
#[test]
|
||||
fn after_queue_duplicate_msgid() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
|
@ -29,6 +29,7 @@ fn before_queue_start_end_time_string() {
|
||||
#[test]
|
||||
fn before_queue_start_end_timestamp() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -52,6 +53,7 @@ fn before_queue_start_end_timestamp() {
|
||||
#[test]
|
||||
fn before_queue_qid() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -77,6 +79,7 @@ fn before_queue_qid() {
|
||||
#[test]
|
||||
fn before_queue_host() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -102,6 +105,7 @@ fn before_queue_host() {
|
||||
#[test]
|
||||
fn before_queue_search_string() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -127,6 +131,7 @@ fn before_queue_search_string() {
|
||||
#[test]
|
||||
fn before_queue_search_string_case_insensitive() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -152,6 +157,7 @@ fn before_queue_search_string_case_insensitive() {
|
||||
#[test]
|
||||
fn before_queue_exclude_greylist_ndr() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -177,6 +183,7 @@ fn before_queue_exclude_greylist_ndr() {
|
||||
#[test]
|
||||
fn before_queue_to() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -202,6 +209,7 @@ fn before_queue_to() {
|
||||
#[test]
|
||||
fn before_queue_mixed_downstream() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-v")
|
||||
@ -225,6 +233,7 @@ fn before_queue_mixed_downstream() {
|
||||
#[test]
|
||||
fn before_queue_from_to() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -252,6 +261,7 @@ fn before_queue_from_to() {
|
||||
#[test]
|
||||
fn before_queue_mixed_accept_block_quarantine() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
@ -276,6 +286,7 @@ fn before_queue_mixed_accept_block_quarantine() {
|
||||
#[test]
|
||||
fn before_queue_to_search_string() {
|
||||
let output = Command::new("faketime")
|
||||
.env("TZ", "Europe/Vienna")
|
||||
.arg("2020-12-31 23:59:59")
|
||||
.arg(utils::log_tracker_path())
|
||||
.arg("-vv")
|
||||
|
Loading…
Reference in New Issue
Block a user