From 7a94acca6a9efb546f1cf59f63fcb89f98944ea5 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: May 25 2023 12:24:53 +0000 Subject: 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 Reviewed-By: Mohammad Rizwan --- diff --git a/ipatests/test_integration/test_acme.py b/ipatests/test_integration/test_acme.py index c73f441..c69e810 100644 --- a/ipatests/test_integration/test_acme.py +++ b/ipatests/test_integration/test_acme.py @@ -583,20 +583,20 @@ class TestACMERenew(IntegrationTest): tasks.kdestroy_all(host) tasks.move_date(host, 'stop', '+90days') - tasks.get_kdcinfo(host) + tasks.get_kdcinfo(self.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", + self.master, "KRB5_TRACE=/dev/stdout kinit admin", stdin_text='{0}\n{0}\n{0}\n'.format( - self.clients[0].config.admin_password + self.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(self.master) yield