From c8205fb7688f165731491f59bef3ca9fe765fd95 Mon Sep 17 00:00:00 2001 From: Oleg Fayans Date: Tue, 30 Aug 2016 11:47:28 +0200 Subject: [PATCH] Removed incorrect check for returncode The server installation in most cases returns response code 0 no matter what happens except for really severe errors. In this case when we try to uninstall the middle replica of a line topology, it fails, notifies us that we should use '--ignore-topology-disconnect', but returns 0 https://fedorahosted.org/freeipa/ticket/3230 --- ipatests/test_integration/test_replica_promotion.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 3e62f92..fdc2c58 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -348,10 +348,7 @@ def test_replica_uninstallation_prohibited(self): result = self.replicas[0].run_command(['ipa-server-install', '--uninstall', '-U'], raiseonerr=False) - assert(result.returncode > 0), ("The replica was removed without " - "'--ignore-topology-disconnect' option") - assert("Uninstallation leads to disconnected topology" - in result.stdout_text), ("Expected error message was not found") + assert_error(result, "Uninstallation leads to disconnected topology", 0) self.replicas[0].run_command(['ipa-server-install', '--uninstall', '-U', '--ignore-topology-disconnect'])