The new version disables a falsely failing pylint check for ldap_connect method in a master host instance.
On 04/13/2016 10:30 AM, Oleg Fayans wrote: > Hi Martin, > > I've updated the patch with regard to your review. Thank you! > > On 04/12/2016 03:35 PM, Martin Babinsky wrote: >> On 04/07/2016 12:35 PM, Oleg Fayans wrote: >>> >>> >>> >> Hi Oleg, >> >> since this is a part of replica promotion test suite please add the link >> to https://fedorahosted.org/freeipa/ticket/5723 to the commit message. > > Done > >> >> The patch cannot be applied cleanly, even 3-way merge fails with: >> >> """ >> git am >> ../review/ofayans/freeipa-ofayans-0035-Add-test-if-replica-is-working-after-domain-upgrade.patch >> -3 >> Applying: Add test if replica is working after domain upgrade >> error: invalid object 100644 acae5c924594cc73bf262eeab5f843f252723207 >> for 'ipatests/test_integration/test_replica_promotion.py' >> fatal: git-write-tree: error building trees >> Repository lacks necessary blobs to fall back on 3-way merge. >> Cannot fall back to three-way merge. >> Patch failed at 0001 Add test if replica is working after domain upgrade >> """ >> >> I had to fall back to plain 'patch -p1' >> >> I have your previous patches 0033-0034 applied. The patch probably needs >> a rebase. > > Fixed > >> >> Also I would be more happy if the username for 'testuser' was not >> hardcoded in the code. You can factor it out as a class member. >> > > Done > > > -- Oleg Fayans Quality Engineer FreeIPA team RedHat.
From 5dab8c8ada78469dc41c36d170009e6637749887 Mon Sep 17 00:00:00 2001 From: Oleg Fayans <[email protected]> Date: Thu, 14 Apr 2016 13:46:04 +0200 Subject: [PATCH] Add test if replica is working after domain upgrade Corresponds to the testcase described in http://www.freeipa.org/page/V4/Replica_Promotion/Test_plan#Test_case: _Replica_created_using_old_workflow_is_functional_after_domain_upgrade https://fedorahosted.org/freeipa/ticket/5723 --- .../test_integration/test_replica_promotion.py | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 85beaec4530848b6005712a1ae1dead5f5d69cd4..d014018b9965d8fb195e41152ec23031628282bb 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -351,3 +351,31 @@ class TestProhibitReplicaUninstallation(IntegrationTest): in result.stdout_text), ("Expected error message was not found") self.replicas[0].run_command(['ipa-server-install', '--uninstall', '-U', '--ignore-topology-disconnect']) + + +class TestOldReplicaWorksAfterDomainUpgrade(IntegrationTest): + topology = 'star' + num_replicas = 1 + domain_level = DOMAIN_LEVEL_0 + username = 'testuser' + + def test_replica_after_domain_upgrade(self): + tasks.kinit_admin(self.master) + tasks.kinit_admin(self.replicas[0]) + self.master.run_command(['ipa', 'user-add', self.username, + '--first', 'test', + '--last', 'user']) + tasks.wait_for_replication(self.replicas[0].ldap_connect()) + self.master.run_command(['ipa', 'domainlevel-set', + str(DOMAIN_LEVEL_1)]) + result = self.replicas[0].run_command(['ipa', 'user-show', + self.username]) + assert("User login: %s" % self.username in result.stdout_text), ( + "A testuser was not found on replica after domain upgrade") + self.replicas[0].run_command(['ipa', 'user-del', self.username]) + # pylint: disable=no-member + tasks.wait_for_replication(self.master.ldap_connect()) + # pylint: enable=no-member + result1 = self.master.run_command(['ipa', 'user-show', self.username], + raiseonerr=False) + assert_error(result1, "%s: user not found" % self.username, 2) -- 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
