mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
ipatests: use whole date for journalctl --since
When a test is executed around midnight and is checking the journal content with --since=date, it needs to specify the whole date (with day and time) to avoid missing entries. If for instance --since=23:59:00 is used and the current time is now 00:01:00, --since=23:59:00 would refer to a date in the future and no journal entry will be found. Fixes: https://pagure.io/freeipa/issue/8953 Reviewed-By: Stanislav Levin <slev@altlinux.org> Reviewed-By: François Cami <fcami@redhat.com>
This commit is contained in:
parent
3f134fea38
commit
7b5ef8aede
@ -69,7 +69,7 @@ class TestInstallMasterClient(IntegrationTest):
|
||||
|
||||
# time to look into journal logs in
|
||||
# test_certmonger_ipa_responder_jsonrpc
|
||||
cls.since = time.strftime('%H:%M:%S')
|
||||
cls.since = time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
||||
def test_cacert_file_appear_with_option_F(self):
|
||||
"""Test if getcert creates cacert file with -F option
|
||||
|
@ -1208,7 +1208,8 @@ class TestIPACommand(IntegrationTest):
|
||||
# start to look at logs a bit before "now"
|
||||
# https://pagure.io/freeipa/issue/8432
|
||||
since = time.strftime(
|
||||
'%H:%M:%S', (datetime.now() - timedelta(seconds=10)).timetuple()
|
||||
'%Y-%m-%d %H:%M:%S',
|
||||
(datetime.now() - timedelta(seconds=10)).timetuple()
|
||||
)
|
||||
|
||||
password = 'WrongPassword'
|
||||
|
@ -130,7 +130,7 @@ class TestNFS(IntegrationTest):
|
||||
nfsclt = self.clients[1]
|
||||
|
||||
# for journalctl --since
|
||||
since = time.strftime('%H:%M:%S')
|
||||
since = time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
nfsclt.run_command(["systemctl", "restart", "rpc-gssd"])
|
||||
time.sleep(WAIT_AFTER_INSTALL)
|
||||
mountpoints = ("/mnt/krb", "/mnt/std", "/home")
|
||||
|
Loading…
Reference in New Issue
Block a user