[pmg-devel] [PATCH log-tracker 2/2] tests: update to match the compatibility changes

Mira Limbeck m.limbeck at proxmox.com
Wed Jun 28 10:54:29 CEST 2023


Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
---
 tests/test_output_time_rfc3339_mixed | 26 +++++++++++++-------------
 tests/tests_time_rfc3339.rs          |  5 ++++-
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/tests/test_output_time_rfc3339_mixed b/tests/test_output_time_rfc3339_mixed
index 6c597d9..3e628b8 100644
--- a/tests/test_output_time_rfc3339_mixed
+++ b/tests/test_output_time_rfc3339_mixed
@@ -1,16 +1,16 @@
-# LogReader: 6673
+# LogReader: 31272
 # Query options
 # Start: 2023-06-23 00:00:00 (1687478400)
-# End: 2023-06-23 23:59:59 (1687564799)
+# End: 2023-06-23 23:59:00 (1687564740)
 # End Query Options
 
 QENTRY: 520C9C0192
-CTIME: 64958F79
+CTIME: 6495AB99
 SIZE: 1902
 CLIENT: pmghost.mydomain.tld[192.168.1.001]
 MSGID: <redacted:msgid>
-TO:64958F79:520C9C0192:Q: from <redacted:returnpath at domain.tld> to <user at domain2.tld> (C01C264958F7962FEA)
-TO:64958F79:520C9C0192:Q: from <redacted:returnpath at domain.tld> to <test at mydomain.tld> (C01C264958F7962FEA)
+TO:6495AB99:520C9C0192:Q: from <redacted:returnpath at domain.tld> to <user at domain2.tld> (C01C264958F7962FEA)
+TO:6495AB99:520C9C0192:Q: from <redacted:returnpath at domain.tld> to <test at mydomain.tld> (C01C264958F7962FEA)
 SMTP:
 L00000004 2023-06-23T14:26:29.331019+02:00 pmg1 postfix/smtpd[1181]: connect from pmghost.mydomain.tld[192.168.1.001]
 L00000005 2023-06-23T14:26:29.336189+02:00 pmg1 postfix/smtpd[1181]: 520C9C0192: client=pmghost.mydomain.tld[192.168.1.001]
@@ -29,12 +29,12 @@ L00000011 2023-06-23T14:26:33.461645+02:00 pmg1 postfix/lmtp[1186]: 520C9C0192:
 L00000012 2023-06-23T14:26:33.461834+02:00 pmg1 postfix/qmgr[1136]: 520C9C0192: removed
 
 QENTRY: 866B7C0192
-CTIME: 6495ABDD
+CTIME: 6495C7FD
 SIZE: 44585
 CLIENT: pmghost.mydomain.tld[192.168.1.001]
 MSGID: <redacted:msgid>
-TO:6495ABDD:866B7C0192:Q: from <redacted:returnpath at domain.tld> to <user at domain2.tld> (C01C364958FBD55D53)
-TO:6495ABDD:866B7C0192:Q: from <redacted:returnpath at domain.tld> to <test at mydomain.tld> (C01C364958FBD55D53)
+TO:6495C7FD:866B7C0192:Q: from <redacted:returnpath at domain.tld> to <user at domain2.tld> (C01C364958FBD55D53)
+TO:6495C7FD:866B7C0192:Q: from <redacted:returnpath at domain.tld> to <test at mydomain.tld> (C01C364958FBD55D53)
 SMTP:
 L00000019 2023-06-23T14:27:40.550478Z pmg1 postfix/smtpd[1181]: connect from pmghost.mydomain.tld[192.168.1.001]
 L0000001A 2023-06-23T14:27:40.550799Z pmg1 postfix/smtpd[1181]: 866B7C0192: client=pmghost.mydomain.tld[192.168.1.001]
@@ -53,12 +53,12 @@ L00000026 2023-06-23T14:27:41.429627Z pmg1 postfix/lmtp[1186]: 866B7C0192: to=<u
 L00000027 2023-06-23T14:27:41.429803Z pmg1 postfix/qmgr[1136]: 866B7C0192: removed
 
 QENTRY: C4EC9C0192
-CTIME: 6495C82A
+CTIME: 6495E44A
 SIZE: 130922
 CLIENT: pmghost.mydomain.tld[192.168.1.001]
 MSGID: <redacted:msgid>
-TO:6495C82A:C4EC9C0192:Q: from <redacted:returnpath at domain.tld> to <user at domain2.tld> (C01D364958FEA2A254)
-TO:6495C82A:C4EC9C0192:Q: from <redacted:returnpath at domain.tld> to <test at mydomain.tld> (C01D364958FEA2A254)
+TO:6495E44A:C4EC9C0192:Q: from <redacted:returnpath at domain.tld> to <user at domain2.tld> (C01D364958FEA2A254)
+TO:6495E44A:C4EC9C0192:Q: from <redacted:returnpath at domain.tld> to <test at mydomain.tld> (C01D364958FEA2A254)
 SMTP:
 L0000002C 2023-06-23T14:28:23.806586-02:00 pmg1 postfix/smtpd[1181]: connect from pmghost.mydomain.tld[192.168.1.001]
 L0000002D 2023-06-23T14:28:23.806755-02:00 pmg1 postfix/smtpd[1181]: C4EC9C0192: client=pmghost.mydomain.tld[192.168.1.001]
@@ -77,11 +77,11 @@ L00000038 2023-06-23T14:28:26.241632-02:00 pmg1 postfix/lmtp[1186]: C4EC9C0192:
 L00000039 2023-06-23T14:28:26.242140-02:00 pmg1 postfix/qmgr[1136]: C4EC9C0192: removed
 
 QENTRY: 71386C0192
-CTIME: 6495C841
+CTIME: 6495E461
 SIZE: 129347
 CLIENT: localhost.localdomain[127.0.0.1]
 MSGID: <redacted:msgid>
-TO:6495C841:71386C0192:2: from <postmaster at pmghost.mydomain.tld> to <user at domain2.tld> (relay.domain3.tld[192.168.1.002]:25)
+TO:6495E461:71386C0192:2: from <postmaster at pmghost.mydomain.tld> to <user at domain2.tld> (relay.domain3.tld[192.168.1.002]:25)
 SMTP:
 L0000003C 2023-06-23T14:28:42.463301-02:00 pmg1 postfix/smtpd[1274]: connect from localhost.localdomain[127.0.0.1]
 L0000003D 2023-06-23T14:28:42.463813-02:00 pmg1 postfix/smtpd[1274]: 71386C0192: client=localhost.localdomain[127.0.0.1]
diff --git a/tests/tests_time_rfc3339.rs b/tests/tests_time_rfc3339.rs
index 874a332..edcface 100644
--- a/tests/tests_time_rfc3339.rs
+++ b/tests/tests_time_rfc3339.rs
@@ -6,7 +6,10 @@ mod utils;
 
 #[test]
 fn after_queue_time_rfc3339_mixed() {
-    let output = Command::new(utils::log_tracker_path())
+    let output = Command::new("faketime")
+        .env("TZ", "Europe/Vienna")
+        .arg("2023-06-28 23:59:59")
+        .arg(utils::log_tracker_path())
         .arg("-vv")
         .arg("-s")
         .arg("2023-06-23 00:00:00")
-- 
2.30.2




More information about the pmg-devel mailing list