--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.
From 8b8732c3d86820124c117c88c6f892d9bb41cbc3 Mon Sep 17 00:00:00 2001
From: Oleg Fayans <ofay...@redhat.com>
Date: Thu, 4 Aug 2016 12:42:23 +0200
Subject: [PATCH] Fixed incorrect return code assert

The assert checked that the returncode of the replica uninstallation is zero
where in fact the uninstallation was expected to fail with the certain error
message
---
 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 7bc1d5281880221578df3c269a3d7715777bb8e0..e4cac69738bd9c265c88ccc23392adad38486c1a 100644
--- a/ipatests/test_integration/test_replica_promotion.py
+++ b/ipatests/test_integration/test_replica_promotion.py
@@ -345,7 +345,7 @@ class TestProhibitReplicaUninstallation(IntegrationTest):
         result = self.replicas[0].run_command(['ipa-server-install',
                                                '--uninstall', '-U'],
                                               raiseonerr=False)
-        assert(result.returncode == 0), ("The replica was removed without "
+        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")
-- 
1.8.3.1

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to