From 56639861a96754ad9f0ddec6d240cf62d750cf41 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Sat, 3 Apr 2021 12:48:38 +0200 Subject: [PATCH] ipatests: call server-del before replica uninstall The test test_replica_promotion.py::TestRenewalMaster:: test_automatic_renewal_master_transfer_ondelete is calling ipa-server-install --uninstall directly without performing first ipa server-del. This can lead to incomplete uninstallation and test failures. Call tasks.uninstall_replica instead of tasks.uninstall_master. This is equivalent to ipa-replica-manage del + uninstall (ipa-replica-manage del works in DL0 and DL1 and internally calls ipa server-del in DL1). Fixes: https://pagure.io/freeipa/issue/8792 Signed-off-by: Florence Blanc-Renaud Reviewed-By: Rob Crittenden --- ipatests/test_integration/test_replica_promotion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index eb7ba590c..0a137dbdc 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -402,7 +402,7 @@ class TestRenewalMaster(IntegrationTest): def test_automatic_renewal_master_transfer_ondelete(self): # Test that after replica uninstallation, master overtakes the cert # renewal master role from replica (which was previously set there) - tasks.uninstall_master(self.replicas[0]) + tasks.uninstall_replica(self.master, self.replicas[0]) result = self.master.run_command(['ipa', 'config-show']).stdout_text assert("IPA CA renewal master: %s" % self.master.hostname in result), ( "Master hostname not found among CA renewal masters"