From 443aff6a0ae4bc35ceb7a4adc06c9b7bb2704743 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Mon, 1 Dec 2025 15:01:26 +0100 Subject: [PATCH] ipatests: fix teardown of TestIpaCertFix The test is moving the date in the future to simulate CA certificate expiration, then uninstalls the server. If certmonger is working, the uninstaller may fail with a Dbus Exception. The test can be fixed with the same strategy as other tests changing the date: stop certmonger and remove the tracking requests before uninstallation. Fixes: https://pagure.io/freeipa/issue/9888 Signed-off-by: Florence Blanc-Renaud Reviewed-By: Rob Crittenden --- ipatests/test_integration/test_ipa_cert_fix.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ipatests/test_integration/test_ipa_cert_fix.py b/ipatests/test_integration/test_ipa_cert_fix.py index d11fd3d61..8489f5135 100644 --- a/ipatests/test_integration/test_ipa_cert_fix.py +++ b/ipatests/test_integration/test_ipa_cert_fix.py @@ -144,6 +144,14 @@ class TestIpaCertFix(IntegrationTest): yield + # Prior to uninstall remove all the cert tracking to prevent + # errors from certmonger trying to check the status of certs + # that don't matter because we are uninstalling. + self.master.run_command(['systemctl', 'stop', 'certmonger']) + # Important: run_command with a str argument is able to + # perform shell expansion but run_command with a list of + # arguments is not + self.master.run_command('rm -fv ' + paths.CERTMONGER_REQUESTS_DIR + '*') tasks.uninstall_master(self.master) tasks.move_date(self.master, 'start', '-20Years-1day')