URL: https://github.com/freeipa/freeipa/pull/5952 Author: amore17 Title: #5952: ipatests: use whole date when calling journalctl --since Action: opened
PR body: """ The test test_check_otpd_after_idle_timeout is checking the content of the journal using journalctl --since ... but provides only the time, not the whole date with year-month-day. As a consequence, if the test is executed around midnight it may find nothing in the journal because it's looking for logs after 11:50PM, which is a date in the future. Fixes: https://pagure.io/freeipa/issue/8940 Signed-off-by: Anuja More <am...@redhat.com> """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/5952/head:pr5952 git checkout pr5952
From e26984fe5d7578b6e2e648f63c500c0a8dcf3692 Mon Sep 17 00:00:00 2001 From: Anuja More <am...@redhat.com> Date: Thu, 5 Aug 2021 12:27:38 +0530 Subject: [PATCH] ipatests: use whole date when calling journalctl --since The test test_check_otpd_after_idle_timeout is checking the content of the journal using journalctl --since ... but provides only the time, not the whole date with year-month-day. As a consequence, if the test is executed around midnight it may find nothing in the journal because it's looking for logs after 11:50PM, which is a date in the future. Fixes: https://pagure.io/freeipa/issue/8940 Signed-off-by: Anuja More <am...@redhat.com> --- ipatests/test_integration/test_otp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_otp.py b/ipatests/test_integration/test_otp.py index fd55898caeb..337783ad194 100644 --- a/ipatests/test_integration/test_otp.py +++ b/ipatests/test_integration/test_otp.py @@ -346,7 +346,7 @@ def test_check_otpd_after_idle_timeout(self, setup_otp_nsslapd): Test to verify that when the nsslapd-idletimeout is exceeded (30s idle, 60s sleep) then the ipa-otpd process should exit without error. """ - since = time.strftime('%H:%M:%S') + since = time.strftime('%Y-%m-%d %H:%M:%S') tasks.kinit_admin(self.master) otpuid, totp = add_otptoken(self.master, USER, otptype="totp") try:
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure