mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-24 14:17:41 -05:00
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 <flo@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
1 parent
68cc47a3e4
commit
443aff6a0a
1 file changed
+8
@@ -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')
|
||||
|
||||
|
||||
Reference in new issue
Block a user