ipatests: fix test_crlgen_manage

The goal of the last test in test_crlgen_manage is to ensure that
ipa-server-install --uninstall can proceed if the server is the last one
in the topology, even if it is the CRL generation master.

The current code is wrong because it tries to uninstall the master
(which has already been uninstalled in the prev test), It should rather
uninstall replicas[0].

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Sergey Orlov <sorlov@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Florence Blanc-Renaud 2019-11-25 17:44:44 +01:00 committed by Christian Heimes
parent 8cf4271aae
commit b3d650370c

View File

@ -290,6 +290,10 @@ class TestCRLGenManage(IntegrationTest):
expected_msg = "Deleting this server will leave your installation " \
"without a CRL generation master"
assert expected_msg in result.stdout_text
tasks.run_server_del(
self.replicas[0], self.master.hostname, force=True,
ignore_topology_disconnect=True,
ignore_last_of_role=True)
def test_uninstall_last_master_does_not_require_ignore_last_of_role(self):
"""Test uninstallation of the last master
@ -301,4 +305,5 @@ class TestCRLGenManage(IntegrationTest):
# Make sure CRL gen is enabled on the replica
check_crlgen_enable(self.replicas[0])
# call uninstall without --ignore-last-of-role, should be OK
self.master.run_command(['ipa-server-install', '--uninstall', '-U'])
self.replicas[0].run_command(
['ipa-server-install', '--uninstall', '-U'])