90 lines
3.5 KiB
Diff
90 lines
3.5 KiB
Diff
From a3d71eb72a6125a80a9d7b698f34dcb95dc25184 Mon Sep 17 00:00:00 2001
|
|
From: Anuja More <amore@redhat.com>
|
|
Date: Thu, 5 Aug 2021 20:03:21 +0530
|
|
Subject: [PATCH] ipatests: Test ldapsearch with base scope works with compat
|
|
tree.
|
|
|
|
Added test to verify that ldapsearch for compat tree
|
|
with scope base and sub is not failing.
|
|
|
|
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1958909
|
|
|
|
Signed-off-by: Anuja More <amore@redhat.com>
|
|
Reviewed-By: Mohammad Rizwan <myusuf@redhat.com>
|
|
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
|
|
---
|
|
ipatests/test_integration/test_commands.py | 13 +++++++++++++
|
|
1 file changed, 13 insertions(+)
|
|
|
|
diff --git a/ipatests/test_integration/test_commands.py b/ipatests/test_integration/test_commands.py
|
|
index 2035ced56..e3a0d867e 100644
|
|
--- a/ipatests/test_integration/test_commands.py
|
|
+++ b/ipatests/test_integration/test_commands.py
|
|
@@ -1558,6 +1558,19 @@ class TestIPACommandWithoutReplica(IntegrationTest):
|
|
# Run the command again after cache is removed
|
|
self.master.run_command(['ipa', 'user-show', 'ipauser1'])
|
|
|
|
+ def test_basesearch_compat_tree(self):
|
|
+ """Test ldapsearch against compat tree is working
|
|
+
|
|
+ This to ensure that ldapsearch with base scope is not failing.
|
|
+
|
|
+ related: https://bugzilla.redhat.com/show_bug.cgi?id=1958909
|
|
+ """
|
|
+ tasks.kinit_admin(self.master)
|
|
+ base_dn = str(self.master.domain.basedn)
|
|
+ base = "cn=admins,cn=groups,cn=compat,{basedn}".format(basedn=base_dn)
|
|
+ tasks.ldapsearch_dm(self.master, base, ldap_args=[], scope='sub')
|
|
+ tasks.ldapsearch_dm(self.master, base, ldap_args=[], scope='base')
|
|
+
|
|
|
|
class TestIPAautomount(IntegrationTest):
|
|
@classmethod
|
|
--
|
|
2.31.1
|
|
|
|
From d4062e407d242a72b9d4e32f4fdd6aed086ce005 Mon Sep 17 00:00:00 2001
|
|
From: Anuja More <amore@redhat.com>
|
|
Date: Thu, 5 Aug 2021 20:23:15 +0530
|
|
Subject: [PATCH] ipatests: skip test_basesearch_compat_tree on fedora.
|
|
|
|
slapi-nis with fix is not part of fedora yet.
|
|
test requires with fix:
|
|
https://pagure.io/slapi-nis/c/61ea8f6a104da25329e301a8f56944f860de8177?
|
|
|
|
Signed-off-by: Anuja More <amore@redhat.com>
|
|
Reviewed-By: Mohammad Rizwan <myusuf@redhat.com>
|
|
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
|
|
---
|
|
ipatests/test_integration/test_commands.py | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/ipatests/test_integration/test_commands.py b/ipatests/test_integration/test_commands.py
|
|
index e3a0d867e..4d9a81652 100644
|
|
--- a/ipatests/test_integration/test_commands.py
|
|
+++ b/ipatests/test_integration/test_commands.py
|
|
@@ -38,6 +38,7 @@ from ipatests.create_external_ca import ExternalCA
|
|
from ipatests.test_ipalib.test_x509 import good_pkcs7, badcert
|
|
from ipapython.ipautil import realm_to_suffix, ipa_generate_password
|
|
from ipaserver.install.installutils import realm_to_serverid
|
|
+from pkg_resources import parse_version
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
@@ -1565,6 +1566,12 @@ class TestIPACommandWithoutReplica(IntegrationTest):
|
|
|
|
related: https://bugzilla.redhat.com/show_bug.cgi?id=1958909
|
|
"""
|
|
+ version = self.master.run_command(
|
|
+ ["rpm", "-qa", "--qf", "%{VERSION}", "slapi-nis"]
|
|
+ )
|
|
+ if tasks.get_platform(self.master) == "fedora" and parse_version(
|
|
+ version.stdout_text) <= parse_version("0.56.7"):
|
|
+ pytest.skip("Test requires slapi-nis with fix on fedora")
|
|
tasks.kinit_admin(self.master)
|
|
base_dn = str(self.master.domain.basedn)
|
|
base = "cn=admins,cn=groups,cn=compat,{basedn}".format(basedn=base_dn)
|
|
--
|
|
2.31.1
|
|
|