URL: https://github.com/freeipa/freeipa/pull/270 Author: ofayans Title: #270: Test: uniqueness of certificate renewal master Action: opened
PR body: """ https://fedorahosted.org/freeipa/ticket/6504 """ 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 f5222226caf5cba7ebc7907155f045981ed4daf8 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 --- ipatests/test_integration/test_renewal_master.py | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 ipatests/test_integration/test_renewal_master.py diff --git a/ipatests/test_integration/test_renewal_master.py b/ipatests/test_integration/test_renewal_master.py new file mode 100644 index 0000000..2a4d699 --- /dev/null +++ b/ipatests/test_integration/test_renewal_master.py @@ -0,0 +1,45 @@ +# +# Copyright (C) 2016 FreeIPA Contributors see COPYING for license +# + +from ipatests.test_integration.base import IntegrationTest +from ipatests.test_integration import tasks + + +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 + suffix = ",".join(["dc=%s" % i for i in master.domain.name.split('.')]) + result = master.run_command([ + "ldapsearch", "-Y", "GSSAPI", "-b", + "cn=masters,cn=ipa,cn=etc,%s" % suffix, + "(ipaConfigString=caRenewalMaster)" + ]) + assert("numResponses: 2" in result.stdout_text), ( + "Unexpected number of responces in" + " the command stdout: %s" % result.stdout_text) + assert("numEntries: 1" in result.stdout_text), ( + "Unexpected number of renewal master entries in" + " the command stdout: %s" % result.stdout_text) + # Test that after master uninstallation, replica overtakes the cert + # renewal master role + tasks.uninstall_master(master) + result1 = self.replicas[0].run_command([ + "ldapsearch", "-Y", "GSSAPI", "-b", + "cn=masters,cn=ipa,cn=etc,%s" % suffix, + "(ipaConfigString=caRenewalMaster)" + ]) + assert("numEntries: 1" in result1.stdout_text), ( + "Unexpected number of renewal master entries in" + " the command stdout: %s" % result.stdout_text)
-- 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
