From 79eaef2e83f978e70ce372a884a7f8ccd6e2872e Mon Sep 17 00:00:00 2001
From: el_kaboing <el_kaboing@localhost>
Date: Thu, 16 Nov 2006 16:56:15 +0000
Subject: [PATCH] Adding a function to ldap.xml where a search can be conducted with a password required parameter.

---
 opends/tests/functional-tests/shared/functions/ldap.xml |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 opends/tests/functional-tests/testcases/setup/setup.xml |    8 ++++++++
 2 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/opends/tests/functional-tests/shared/functions/ldap.xml b/opends/tests/functional-tests/shared/functions/ldap.xml
index dc9299e..3c9a3c6 100755
--- a/opends/tests/functional-tests/shared/functions/ldap.xml
+++ b/opends/tests/functional-tests/shared/functions/ldap.xml
@@ -185,6 +185,54 @@
 
     </function>
 
+    <function name="SearchObjectNoPwd">
+
+    <function-prolog>
+        This function searches the Directory Server with optional arguments possible
+    </function-prolog>
+
+    <function-map-args>
+        <function-required-arg name="dsInstanceHost">
+            Directory Server Host Name
+        </function-required-arg>
+        <function-required-arg name="dsInstancePort">
+            Directory Server Port Number
+        </function-required-arg>
+        <function-required-arg name="dsInstanceDn">
+            Directory Server Manager DN
+        </function-required-arg>
+        <function-required-arg name="dsBaseDN">
+            The baseDN for the search operation
+        </function-required-arg>
+        <function-required-arg name="dsFilter">
+            The filter for the search operation
+        </function-required-arg>
+        <function-optional-arg name="extraParams" default="' '">
+            Optional extra parameters for specific test cases
+        </function-optional-arg>
+    </function-map-args>
+
+      <sequence>
+
+        <message>
+            'ldapsearch%s -h %s -p %s -D "%s" %s -b "%s" "%s"' % (fileExt,dsInstanceHost,dsInstancePort,dsInstanceDn,extraParams,dsBaseDN,dsFilter)
+        </message>
+        <process name="'Search Base Object'">
+            <location>'%s' % (STAF_REMOTE_HOSTNAME) </location>
+            <command>'%s/ldapsearch%s' % (OPENDS_BINPATH,fileExt)</command>
+            <parms>'-h %s -p %s -D "%s" %s -b "%s" "%s"' % (dsInstanceHost,dsInstancePort,dsInstanceDn,extraParams,dsBaseDN,dsFilter)</parms>
+            <workdir>'%s' % (OPENDS_BINPATH)</workdir>
+            <envs>
+                ['PATH=/bin:/usr/bin:%s' % (OPENDS_BINPATH), 'JAVA_HOME=%s' % (JAVA_HOME)]
+            </envs>
+            <stderr mode="'stdout'"/>
+            <returnstdout/>
+        </process>
+
+      </sequence>
+
+    </function>
+
     <function name="AnonSearchObject">
 
     <function-prolog>
diff --git a/opends/tests/functional-tests/testcases/setup/setup.xml b/opends/tests/functional-tests/testcases/setup/setup.xml
index 1316bcf..91a5867 100755
--- a/opends/tests/functional-tests/testcases/setup/setup.xml
+++ b/opends/tests/functional-tests/testcases/setup/setup.xml
@@ -58,6 +58,14 @@
           }
       </call>
 
+      <call function="'CopyFolderByExtension'">
+          { 'srcfolder'  : TESTS_DIR,
+            'destfolder' : TMP_DATA_DIR,
+            'extension'  : 'pwd',
+            'hostname'   : STAF_LOCAL_HOSTNAME
+          }
+      </call>
+
       <!-- Archive (gz) files -->
       <message>'Copy gz data files'</message>
       <call function="'CopyFolderByExtension'">

--
Gitblit v1.10.0