mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: generic uninstall should call ipa server-del
At the end of any integration test, the method uninstall is called and uninstalls master, replicas and clients. Usually the master is the CA renewal master and DNSSec master, and uninstallation may fail. This commits modifies the uninstall method in order to: - call 'ipa server-del replica' before running uninstall on a replica - uninstall the replicas before uninstalling the master Fixes: https://pagure.io/freeipa/issue/7985 Signed-off-by: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
eebabb5c5f
commit
c77b06265b
@@ -20,6 +20,7 @@
|
||||
"""Base class for FreeIPA integration tests"""
|
||||
|
||||
import pytest
|
||||
import subprocess
|
||||
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from pytest_sourceorder import ordered
|
||||
@@ -97,9 +98,17 @@ class IntegrationTest:
|
||||
|
||||
@classmethod
|
||||
def uninstall(cls, mh):
|
||||
tasks.uninstall_master(cls.master)
|
||||
for replica in cls.replicas:
|
||||
try:
|
||||
tasks.run_server_del(
|
||||
cls.master, replica.hostname, force=True,
|
||||
ignore_topology_disconnect=True, ignore_last_of_role=True)
|
||||
except subprocess.CalledProcessError:
|
||||
# If the master has already been uninstalled,
|
||||
# this call may fail
|
||||
pass
|
||||
tasks.uninstall_master(replica)
|
||||
tasks.uninstall_master(cls.master)
|
||||
for client in cls.clients:
|
||||
tasks.uninstall_client(client)
|
||||
if cls.fips_mode:
|
||||
|
||||
Reference in New Issue
Block a user