URL: https://github.com/freeipa/freeipa/pull/4458
Author: mrizwan93
 Title: #4458: [Backport][ipa-4-6]ipatests: Test if 
schema-compat-entry-attribute is set
Action: opened

PR body:
"""
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>
Reviewed-By: Francois Cami <fc...@redhat.com>
Reviewed-By: Kaleemullah Siddiqui <ksidd...@redhat.com>
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/4458/head:pr4458
git checkout pr4458
From 8b3492f0bd406a20e49f074335d839b45d1c84ea 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] 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>
Reviewed-By: Francois Cami <fc...@redhat.com>
Reviewed-By: Kaleemullah Siddiqui <ksidd...@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 29710bd911..c8725b55f2 100755
--- a/ipatests/test_integration/test_installation.py
+++ b/ipatests/test_integration/test_installation.py
@@ -15,6 +15,7 @@
 import pytest
 from ipalib.constants import DOMAIN_LEVEL_0
 import ipaplatform
+from ipapython.dn import DN
 from ipaplatform.constants import constants
 from ipaplatform.paths import paths
 from ipatests.pytest_ipa.integration.env_config import get_global_config
@@ -422,6 +423,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

Reply via email to