URL: https://github.com/freeipa/freeipa/pull/270 Author: ofayans Title: #270: Test: uniqueness of certificate renewal master Action: synchronized
To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/270/head:pr270 git checkout pr270
From 47eadf36e2ffcce5fff9a8e94527586214b50652 Mon Sep 17 00:00:00 2001 From: Oleg Fayans <[email protected]> Date: Thu, 24 Nov 2016 11:14:15 +0100 Subject: [PATCH] Test: uniqueness of certificate renewal master https://fedorahosted.org/freeipa/ticket/6504 --- .../test_integration/test_replica_promotion.py | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 0e93356..885f327 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -441,3 +441,34 @@ def test_upcase_client_domain(self): raiseonerr=False) assert(result1.returncode == 0), ( 'Failed to promote the client installed with the upcase domain name') + + +class TestRenewalMaster(IntegrationTest): + + topology = 'star' + num_replicas = 1 + + @classmethod + def uninstall(cls, mh): + super(TestRenewalMaster, cls).uninstall(mh) + + def test_replica_not_marked_as_renewal_master(self): + """ + https://fedorahosted.org/freeipa/ticket/5902 + """ + master = self.master + replica = self.replicas[0] + result = master.run_command(["ipa", "config-show"]).stdout_text + assert("IPA CA renewal master: %s" % master.hostname in result), ( + "Master hostname not found among CA renewal masters" + ) + assert("IPA CA renewal master: %s" % replica.hostname not in result), ( + "Replica hostname found among CA renewal masters" + ) + # Test that after master uninstallation, replica overtakes the cert + # renewal master role + tasks.uninstall_master(master) + result1 = replica.run_command(['ipa', 'config-show']).stdout_text + assert("IPA CA renewal master: %s" % replica.hostname in result1), ( + "Replica hostname not found among CA renewal masters" + )
-- 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
