7e1b55
From b2e6292337c6f7f68ac383db8aa54a1abfa3f6b4 Mon Sep 17 00:00:00 2001
7e1b55
From: Florence Blanc-Renaud <flo@redhat.com>
7e1b55
Date: Sun, 11 Jul 2021 16:29:16 +0200
7e1b55
Subject: [PATCH] ipatests: use whole date when calling journalctl --since
7e1b55
7e1b55
The test TestSelfExternalSelf::test_switch_back_to_self_signed
7e1b55
is checking the content of the journal using journalctl --since ...
7e1b55
but provides only the time, not the whole date with year-month-day.
7e1b55
As a consequence, if the test is executed around midnight it may
7e1b55
find nothing in the journal because it's looking for logs after 11:50PM,
7e1b55
which is a date in the future.
7e1b55
Fixes: https://pagure.io/freeipa/issue/8918
7e1b55
7e1b55
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
7e1b55
Reviewed-By: Anuja More <amore@redhat.com>
7e1b55
---
7e1b55
 ipatests/test_integration/test_external_ca.py | 2 +-
7e1b55
 1 file changed, 1 insertion(+), 1 deletion(-)
7e1b55
7e1b55
diff --git a/ipatests/test_integration/test_external_ca.py b/ipatests/test_integration/test_external_ca.py
7e1b55
index 72aa57a0b..d48d73deb 100644
7e1b55
--- a/ipatests/test_integration/test_external_ca.py
7e1b55
+++ b/ipatests/test_integration/test_external_ca.py
7e1b55
@@ -301,7 +301,7 @@ class TestSelfExternalSelf(IntegrationTest):
7e1b55
     def test_switch_back_to_self_signed(self):
7e1b55
 
7e1b55
         # for journalctl --since
7e1b55
-        switch_time = time.strftime('%H:%M:%S')
7e1b55
+        switch_time = time.strftime('%Y-%m-%d %H:%M:%S')
7e1b55
         # switch back to self-signed CA
7e1b55
         result = self.master.run_command([paths.IPA_CACERT_MANAGE, 'renew',
7e1b55
                                           '--self-signed'])
7e1b55
-- 
7e1b55
2.31.1
7e1b55