URL: https://github.com/freeipa/freeipa/pull/4433 Author: tiran Title: #4433: [Backport][ipa-4-8] ipatests:Test if schema-compat-entry-attribute is set Action: opened
PR body: """ This PR was opened automatically because PR #4324 was pushed to master and backport to ipa-4-8 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/4433/head:pr4433 git checkout pr4433
From 5e86d428d61164a2ebbcfa1928c586195d53582e Mon Sep 17 00:00:00 2001 From: Mohammad Rizwan Yusuf <myu...@redhat.com> Date: Mon, 9 Mar 2020 12:49:01 +0530 Subject: [PATCH 1/2] Test if schema-compat-entry-attribute is set This is to ensure if said entry is set after installation with AD. related: https://pagure.io/freeipa/issue/8193 Signed-off-by: Mohammad Rizwan Yusuf <myu...@redhat.com> --- ipatests/test_integration/test_adtrust_install.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ipatests/test_integration/test_adtrust_install.py b/ipatests/test_integration/test_adtrust_install.py index b3dbc0683f..5c207a43ee 100644 --- a/ipatests/test_integration/test_adtrust_install.py +++ b/ipatests/test_integration/test_adtrust_install.py @@ -199,3 +199,18 @@ def test_add_agent_on_running_replica_with_compat(self): entry = conn.get_entry(DN( "cn=groups,cn=Schema Compatibility,cn=plugins,cn=config")) assert entry.single_value['schema-compat-lookup-nsswitch'] == "group" + + def test_schema_compat_attribute(self): + """Test if schema-compat-entry-attribute is set + + This is to ensure if said entry is set after installation with AD. + + related: https://pagure.io/freeipa/issue/8193 + """ + conn = self.replicas[0].ldap_connect() + entry = conn.get_entry(DN( + "cn=groups,cn=Schema Compatibility,cn=plugins,cn=config")) + entry_list = list(entry['schema-compat-entry-attribute']) + value = (r'ipaexternalmember=%deref_r(' + '"member","ipaexternalmember")') + assert value in entry_list From d55d14441c9e83b495e8ec497d4e925c606f70f3 Mon Sep 17 00:00:00 2001 From: Mohammad Rizwan Yusuf <myu...@redhat.com> Date: Fri, 20 Mar 2020 12:51:13 +0530 Subject: [PATCH 2/2] Test if schema-compat-entry-attribute is set This is to ensure if said entry is set after installation. It also checks if compat tree is disable. related: https://pagure.io/freeipa/issue/8193 Signed-off-by: Mohammad Rizwan Yusuf <myu...@redhat.com> --- .../test_integration/test_installation.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ipatests/test_integration/test_installation.py b/ipatests/test_integration/test_installation.py index c40603b3d7..8302032893 100644 --- a/ipatests/test_integration/test_installation.py +++ b/ipatests/test_integration/test_installation.py @@ -20,6 +20,7 @@ from ipalib import x509 from ipalib.constants import DOMAIN_LEVEL_0 +from ipapython.dn import DN from ipaplatform.constants import constants from ipaplatform.osinfo import osinfo from ipaplatform.paths import paths @@ -541,6 +542,24 @@ def install(cls, mh): def test_install_master(self): tasks.install_master(self.master, setup_dns=False) + def test_schema_compat_attribute_and_tree_disable(self): + """Test if schema-compat-entry-attribute is set + + This is to ensure if said entry is set after installation. + It also checks if compat tree is disable. + + related: https://pagure.io/freeipa/issue/8193 + """ + conn = self.master.ldap_connect() + entry = conn.get_entry(DN( # pylint: disable=no-member + "cn=groups,cn=Schema Compatibility,cn=plugins,cn=config")) + + entry_list = list(entry['schema-compat-entry-attribute']) + value = (r'ipaexternalmember=%deref_r(' + '"member","ipaexternalmember")') + assert value in entry_list + assert 'schema-compat-lookup-nsswitch' not in entry_list + def test_install_kra(self): tasks.install_kra(self.master, first_instance=True)
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org