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