This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch master
in repository 389-ds-base.
commit b66b7126ac363890ad715b5bb855c018050e3a6b
Author: Amita Sharma <amsharma(a)redhat.com>
Date: Wed Dec 6 16:13:19 2017 +0530
Issue 49443 - Add CI test case
Description: Add a test case to suites/filter/filter_test.py.
Test that ldapsearch with scope one returns only one entry.
https://pagure.io/389-ds-base/issue/49443
Reviewed by: wibrown (Thanks!) spichugi
Signed-off-by: Simon Pichugin <spichugi(a)redhat.com>
---
dirsrvtests/tests/suites/filter/filter_test.py | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/dirsrvtests/tests/suites/filter/filter_test.py
b/dirsrvtests/tests/suites/filter/filter_test.py
index a6007e0..a2fb933 100644
--- a/dirsrvtests/tests/suites/filter/filter_test.py
+++ b/dirsrvtests/tests/suites/filter/filter_test.py
@@ -100,6 +100,30 @@ def test_filter_search_original_attrs(topology_st):
log.info('test_filter_search_original_attrs: PASSED')
+(a)pytest.mark.bz1511462
+def test_filter_scope_one(topology_st):
+ """Test ldapsearch with scope one gives only single entry
+
+ :id: cf5a6078-bbe6-4d43-ac71-553c45923f91
+ :setup: Standalone instance
+ :steps:
+ 1. Search cn=Directory Administrators,dc=example,dc=com using ldapsearch with
+ scope one using base as dc=example,dc=com
+ 2. Check that search should return only one entry
+ :expectedresults:
+ 1. This should pass
+ 2. This should pass
+ """
+
+ parent_dn="dn: dc=example,dc=com"
+ child_dn="dn: cn=Directory Administrators,dc=example,dc=com"
+
+ log.info('Search user using ldapsearch with scope one')
+ results = topology_st.standalone.search_s(DEFAULT_SUFFIX,
ldap.SCOPE_ONELEVEL,'cn=Directory Administrators',['cn'] )
+ log.info(results)
+
+ log.info('Search should only have one entry')
+ assert len(results) == 1
if __name__ == '__main__':
# Run isolated
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.