Hi Martin & Martin, The updated patches are included. both apply cleanly and pass pylint
On 04/14/2016 02:17 PM, Martin Basti wrote: > > > On 14.04.2016 14:04, Oleg Fayans wrote: >> 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 >>> >>> >>> >> >> > > I suggest to put missing member here: > > diff --git a/pylint_plugins.py b/pylint_plugins.py > index c3042f4..7a421ab 100644 > --- a/pylint_plugins.py > +++ b/pylint_plugins.py > @@ -230,6 +230,7 @@ ipa_class_members = { > {'transport': ['put_file']}, > 'put_file_contents', > 'get_file_contents', > + 'ldap_connect', > ]}, > 'replicas', > 'clients', > > instead of disabling the check locally (untested) > > Martin^2 -- Oleg Fayans Quality Engineer FreeIPA team RedHat.
From b398ceb3e12b605a2afe3c9060d330a927cdeae2 Mon Sep 17 00:00:00 2001 From: Oleg Fayans <[email protected]> Date: Thu, 14 Apr 2016 16:39:10 +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 | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 85beaec4530848b6005712a1ae1dead5f5d69cd4..1f683b6d5c067ec526b307eea1460cafbadb80cb 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -351,3 +351,29 @@ 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]) + tasks.wait_for_replication(self.master.ldap_connect()) + 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
From adfd6d64d568aab5534f65cdfc8e06d07d41eb7f Mon Sep 17 00:00:00 2001 From: Oleg Fayans <[email protected]> Date: Thu, 14 Apr 2016 16:49:17 +0200 Subject: [PATCH] disabled check for ldap_connect in pylint --- pylint_plugins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pylint_plugins.py b/pylint_plugins.py index c3042f4a4597bef748a786ca0664760f67ebeb6b..7a421abd39af48d6fdda16da099fb6e7b70a61d4 100644 --- a/pylint_plugins.py +++ b/pylint_plugins.py @@ -230,6 +230,7 @@ ipa_class_members = { {'transport': ['put_file']}, 'put_file_contents', 'get_file_contents', + 'ldap_connect', ]}, 'replicas', 'clients', -- 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
