mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: wait for sssd-kcm to settle after date change
In order to expire the ACME cert, system is moved and while issuing the kinit command, results into failure. Hence run kinit command repeatedly untill things get settle. This patch removes the sleep and adds tasks.run_repeatedly() method instead. Signed-off-by: Mohammad Rizwan <myusuf@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
committed by
Florence Blanc-Renaud
parent
72dccd8244
commit
2eb4cdb641
@@ -602,21 +602,20 @@ def issue_and_expire_acme_cert():
|
||||
tasks.kdestroy_all(host)
|
||||
tasks.move_date(host, 'stop', '+90days+60minutes')
|
||||
|
||||
time.sleep(10)
|
||||
tasks.get_kdcinfo(host)
|
||||
# Note raiseonerr=False:
|
||||
# the assert is located after kdcinfo retrieval.
|
||||
result = master.run_command(
|
||||
"KRB5_TRACE=/dev/stdout kinit admin",
|
||||
# run kinit command repeatedly until sssd gets settle
|
||||
# after date change
|
||||
tasks.run_repeatedly(
|
||||
host, "KRB5_TRACE=/dev/stdout kinit admin",
|
||||
stdin_text='{0}\n{0}\n{0}\n'.format(
|
||||
master.config.admin_password
|
||||
),
|
||||
raiseonerr=False
|
||||
host.config.admin_password
|
||||
)
|
||||
)
|
||||
# Retrieve kdc.$REALM after the password change, just in case SSSD
|
||||
# domain status flipped to online during the password change.
|
||||
tasks.get_kdcinfo(host)
|
||||
assert result.returncode == 0
|
||||
|
||||
yield _issue_and_expire_acme_cert
|
||||
|
||||
|
||||
Reference in New Issue
Block a user