mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ACME tests: fix issue_and_expire_acme_cert method
The fixture issue_and_expire_acme_cert is changing the date on master and client. It also resets the admin password as it gets expired after the date change. Currently the code is resetting the password by performing kinit on the client, which leaves the master with an expired ticket in its cache. Reset the password on the master instead in order to have a valid ticket for the next operations. Fixes: https://pagure.io/freeipa/issue/9383 Signed-off-by: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Mohammad Rizwan <myusuf@redhat.com>
This commit is contained in:
committed by
Rob Crittenden
parent
8eeba00c4f
commit
359e1a3d95
@@ -602,20 +602,20 @@ def issue_and_expire_acme_cert():
|
||||
tasks.kdestroy_all(host)
|
||||
tasks.move_date(host, 'stop', '+90days+60minutes')
|
||||
|
||||
tasks.get_kdcinfo(host)
|
||||
tasks.get_kdcinfo(master)
|
||||
# Note raiseonerr=False:
|
||||
# the assert is located after kdcinfo retrieval.
|
||||
# run kinit command repeatedly until sssd gets settle
|
||||
# after date change
|
||||
tasks.run_repeatedly(
|
||||
host, "KRB5_TRACE=/dev/stdout kinit admin",
|
||||
master, "KRB5_TRACE=/dev/stdout kinit admin",
|
||||
stdin_text='{0}\n{0}\n{0}\n'.format(
|
||||
host.config.admin_password
|
||||
master.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)
|
||||
tasks.get_kdcinfo(master)
|
||||
|
||||
yield _issue_and_expire_acme_cert
|
||||
|
||||
|
||||
Reference in New Issue
Block a user