mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

tdj_tx
06.41.2007 feff0111ce55c3976e2d2849a08cdb170ee17fd5
Added command line utilities tests
8 files added
2701 ■■■■■ changed files
opends/tests/functional-tests/testcases/clu/cluCompare.xml 122 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/cluDelete.xml 122 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/cluModify.xml 861 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/cluSearch.xml 1141 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/clu_cleanup.xml 103 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/clu_setup.xml 138 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/clu_setup_sav.xml 142 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/commands.xml 72 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/clu/cluCompare.xml
New file
@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, exclude this CDDL HEADER in each
 ! file and exclude the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_cluCompare"/>
  <function name="main_cluCompare">
    <sequence>
      <block name="'cluCompare'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='clu'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
         <!--- Test Suite information
            #@TestSuiteName       Clu: Ldap Compare: ldapcompare Tests
            #@TestSuitePurpose    Check the ldapcompare command with common options and input and output options
            #@TestSuiteID         Clu Ldap Compare Tests
            #@TestSuiteGroup      cluCompare
            #@TestGroup           clu
            #@TestScript          cluCompare.xml
            #@TestHTMLLink        http://opends.dev.java.net/
          -->
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/clu_setup.xml' % (TESTS_DIR)"/>
          <call function="'clu_setup'">
            { 'startDS' : True,
              'loadBackend' : True }
          </call>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Compare Tests
            #@TestName            Clu: Ldap Compare: Test Case #1
            #@TestID              Test Case #1
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapCompareWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Compare: Test Case #1'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Compare: Test Case #1'
                    </message>
                    <call function="'ldapCompareWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'         : 'ou=People,o=core tests,dc=example,dc=com' ,
                        'dsFilter'         : 'objectclass=*' }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase>
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/clu_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'clu_cleanup'"> { 'stopDS' : True } </call>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/functional-tests/testcases/clu/cluDelete.xml
New file
@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, exclude this CDDL HEADER in each
 ! file and exclude the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_cluDelete"/>
  <function name="main_cluDelete">
    <sequence>
      <block name="'cluDelete'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='clu'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
         <!--- Test Suite information
            #@TestSuiteName       Clu: Ldap Delete: ldapdelete Tests
            #@TestSuitePurpose    Check the ldapdelete command with common options and input and output options
            #@TestSuiteID         Clu Ldap Delete Tests
            #@TestSuiteGroup      cluDelete
            #@TestGroup           clu
            #@TestScript          cluDelete.xml
            #@TestHTMLLink        http://opends.dev.java.net/
          -->
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/clu_setup.xml' % (TESTS_DIR)"/>
          <call function="'clu_setup'">
            { 'startDS' : True,
              'loadBackend' : True }
          </call>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Delete Tests
            #@TestName            Clu: Ldap Delete: Test Case #1
            #@TestID              Test Case #1
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapDeleteWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Delete: Test Case #1'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Delete: Test Case #1'
                    </message>
                    <call function="'ldapDeleteWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'         : 'ou=People,o=core tests,dc=example,dc=com' ,
                        'dsFilter'         : 'objectclass=*' }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase>
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/clu_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'clu_cleanup'"> { 'stopDS' : True } </call>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/functional-tests/testcases/clu/cluModify.xml
New file
@@ -0,0 +1,861 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, exclude this CDDL HEADER in each
 ! file and exclude the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_cluModify"/>
  <function name="main_cluModify">
    <sequence>
      <block name="'cluModify'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='clu'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
         <!--- Test Suite information
            #@TestSuiteName       Clu: Ldap Modify: ldapmodify Tests
            #@TestSuitePurpose    Check the ldapmodify command with common options and input and output options
            #@TestSuiteID         Clu Ldap Modify Tests
            #@TestSuiteGroup      cluModify
            #@TestGroup           clu
            #@TestScript          cluModify.xml
            #@TestHTMLLink        http://opends.dev.java.net/
          -->
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/clu_setup.xml' % (TESTS_DIR)"/>
          <call function="'clu_setup'">
            { 'startDS' : True,
              'loadBackend' : True }
          </call>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #1
            #@TestID              Test Case #1
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #1'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #1'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsAdd'            : 'True' ,
                        'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #2
            #@TestID              Test Case #2
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #2'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #2'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   :  '',
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsAdd'            : 'TRUE' ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 89 }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #3
            #@TestID              Test Case #3
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #3'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #3'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : 'bad' ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsAdd'            : 'TRUE' ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 89 }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #4
            #@TestID              Test Case #4
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #4'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #4'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 91 }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #5
            #@TestID              Test Case #5
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
         <!--        <testcase name="'Clu: Ldap Modify: Test Case #5'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #5'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : '',
                        '-1'               : ' need to add a misc attribute
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 91 }
                    </call>
                  </sequence>
                 </testcase> -->
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #6
            #@TestID              Test Case #6
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #6'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #6'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 89 }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #7
            #@TestID              Test Case #7
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #7'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #7'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : 'cn=bad dn' ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 32 }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #8
            #@TestID              Test Case #8
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
               <!-- this test is prompting for the password
                 <testcase name="'Clu: Ldap Modify: Test Case #8'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #8'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 48 }
                    </call>
                  </sequence>
                 </testcase> -->
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #9
            #@TestID              Test Case #9
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #9'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #9'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : 'badpwd' ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 49 }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #10
            #@TestID              Test Case #10
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #10'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #10'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : ' '}
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 89 }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #11
            #@TestID              Test Case #11
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #11'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #11'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : 'bad'}
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 89 }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #12
            #@TestID              Test Case #12
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #12'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #12'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #13
            #@TestID              Test Case #13
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #13'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #13'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsVerbose'        : 'TRUE',
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #14
            #@TestID              Test Case #14
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #14'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #14'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'    : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'      : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD ,
                        'dsContinueOnError' : 'TRUE',
                        'dsFilename'        : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #15
            #@TestID              Test Case #15
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
               <!-- needs a -R option?
                 <testcase name="'Clu: Ldap Modify: Test Case #15'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #15'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase> -->
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #16
            #@TestID              Test Case #16
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #16'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #16'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsAdd'            : 'TRUE' ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #17
            #@TestID              Test Case #17
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
               <!-- need a -b option
                 <testcase name="'Clu: Ldap Modify: Test Case #17'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #17'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase> -->
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #18
            #@TestID              Test Case #18
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
               <!-- need a -F option
                 <testcase name="'Clu: Ldap Modify: Test Case #18'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #18'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase> -->
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #19
            #@TestID              Test Case #19
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
               <!-- need a -e option
                 <testcase name="'Clu: Ldap Modify: Test Case #19'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #19'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                  </sequence>
                 </testcase> -->
          <!--- Test Case information
            #@TestMarker          Clu Ldap Modify Tests
            #@TestName            Clu: Ldap Modify: Test Case #20
            #@TestID              Test Case #20
            #@TestPurpose         Verify an export of a LDIF file on the default backend.
            #@TestPreamble
            #@TestSteps           Client calls exportLDIF with the parameters
                                  default backend, and ldifFile. Import the ldifFile to
                                  a second instance, then do a search to verify the import.
            #@TestPostamble
            #@TestResult          Success if ldapModifyWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Modify: Test Case #20'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Modify: Test Case #20'
                    </message>
                    <call function="'ldapModifyWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsHelp'           : 'TRUE',
                        'dsFilename'       : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult ,
                        'expected'   : 89 }
                    </call>
                  </sequence>
                 </testcase>
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/clu_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'clu_cleanup'"> { 'stopDS' : True } </call>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/functional-tests/testcases/clu/cluSearch.xml
New file
@@ -0,0 +1,1141 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, exclude this CDDL HEADER in each
 ! file and exclude the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_cluSearch"/>
  <function name="main_cluSearch">
    <sequence>
      <block name="'cluSearch'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='clu'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
         <!--- Test Suite information
            #@TestSuiteName       Clu: Ldap Search: ldapsearch Tests
            #@TestSuitePurpose    Check the ldapsearch command with common options and input and output options
            #@TestSuiteID         Clu Ldap Search Tests
            #@TestSuiteGroup      cluSearch
            #@TestGroup           clu
            #@TestScript          cluSearch.xml
            #@TestHTMLLink        http://opends.dev.java.net/
          -->
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/clu_setup.xml' % (TESTS_DIR)"/>
          <call function="'clu_setup'">
            { 'startDS' : True,
              'loadBackend' : True }
          </call>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case #1
            #@TestID              Test Case #1
            #@TestPurpose         Verify a substring ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #1'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #1'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case #2
            #@TestID              Test Case #2
            #@TestPurpose         Verify a parameter default doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, without using hostname
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0.
                                  In OpenDS if hostname is not given then a default
                                  of localhost is used.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #2'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #2'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      { 'returncode' : RC ,
                        'result'     : STAXResult}
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case #3
            #@TestID              Test Case #3
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, and using an invalid hostname
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 91.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #3'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #3'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : 'badhost' ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 91 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case #4
            #@TestID              Test Case #4
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, with no port or basedn used.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 89.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #4'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #4'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 89 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case #5
            #@TestID              Test Case #5
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, with no port number and
                                  a -l with no timelimit value.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 89.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #5'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #5'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : ' ' ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsTimeLimit'      : ' ',
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 89 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case #6
            #@TestID              Test Case #6
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, with an invalid bind dn.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 32.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #6'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #6'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : 'cn=bad dn' ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 32 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case #7
            #@TestID              Test Case #7
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, without a password.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 53.
                                  "unwilling to perform"
          -->
         <!--        <testcase name="'Clu: Ldap Search: Test Case #7'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #7'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 48 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase> -->
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 8
            #@TestID              Test Case #8
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, with an invalid password.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 49.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #8'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #8'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : 'bad_password' ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 49 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 9
            #@TestID              Test Case #9
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, with a scope and no value.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 89.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #9'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #9'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsScope'          : ' ',
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 89 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 10
            #@TestID              Test Case #10
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, with an invalid scope.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 89.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #10'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #10'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsScope'          : 'bad ',
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 89 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 11
            #@TestID              Test Case #11
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, with an empty basedn.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 89.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #11'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #11'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 89 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 12
            #@TestID              Test Case #12
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch on cn=Elvis*, with an invalid basedn.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 32.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #12'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #12'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'         : 'o=bad.dn' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 32 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 13
            #@TestID              Test Case #13
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch without a filter.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 89.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #13'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #13'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'         : 'dc=com' , }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult ,
                       'expected'   : 89 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 14
            #@TestID              Test Case #14
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with dry run option.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #14'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #14'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsDryRun'         : 'True' ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 15
            #@TestID              Test Case #15
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with the verbose option.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #15'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #15'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsVerbose'        : 'True' ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 17
            #@TestID              Test Case #17
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with timelimit of 20 seconds option.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #17'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #17'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsTimeLimit'      : '20' ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 18
            #@TestID              Test Case #18
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with timelimit of 1 second.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 85.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #18'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #18'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsTimeLimit'      : '1' ,
                        'dsBaseDN'         : 'dc=example,dc=com' ,
                        'dsFilter'         : 'objectclass=*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult,
                       'expected'   : 85 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 19
            #@TestID              Test Case #19
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with sizelimit option.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #19'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #19'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsSizeLimit'      : '100' ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 20
            #@TestID              Test Case #20
            #@TestPurpose         Verify a parameter error doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with the sizelimit option.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 4.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #20'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #20'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsSizeLimit'      : '1' ,
                        'dsBaseDN'         : 'cn=config' ,
                        'dsFilter'         : 'objectclass=*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult,
                       'expected'   : 4 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 21
            #@TestID              Test Case #21
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with the help option.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #21'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #21'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsHelp'           : 'True' ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 24
            #@TestID              Test Case #24
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with the don't wrap option.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #24'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #24'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsDontWrap'       : 'True' ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 31
            #@TestID              Test Case #31
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with the a sort order of uid.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #31'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #31'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsSortOrder'      : 'uid' ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 32
            #@TestID              Test Case #32
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with the a sort order of bad.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 2, protocol error.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #32'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #32'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                        'dsSortOrder'      : 'bad' ,
                        'dsBaseDN'         : 'dc=com' ,
                        'dsFilter'         : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult,
                       'expected'   : 2 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 33
            #@TestID              Test Case #33
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with the a dereference policy of always.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 0.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #33'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #33'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'      : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'      : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'        : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
                        'dsDereferencePolicy' : 'always' ,
                        'dsBaseDN'            : 'dc=com' ,
                        'dsFilter'            : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 34
            #@TestID              Test Case #34
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with the a dereference policy of bad.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 1, operations error.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #34'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #34'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'      : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'      : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'        : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
                        'dsDereferencePolicy' : 'bad' ,
                        'dsBaseDN'            : 'dc=com' ,
                        'dsFilter'            : 'cn=Elvis*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult,
                       'expected'   : 89 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <!--- Test Case information
            #@TestMarker          Clu Ldap Search Tests
            #@TestName            Clu: Ldap Search: Test Case 35
            #@TestID              Test Case #35
            #@TestPurpose         Verify a parameter doing an ldapsearch.
            #@TestPreamble
            #@TestSteps           Do an ldapsearch with the a bad base dn.
            #@TestPostamble
            #@TestResult          Success if ldapSearchWithScript returns 32.
          -->
                 <testcase name="'Clu: Ldap Search: Test Case #35'">
                  <sequence>
                    <call function="'testCase_Preamble'"/>
                    <message>
                      'Clu: Ldap Search: Test Case #35'
                    </message>
                    <call function="'ldapSearchWithScript'">
                      { 'dsInstanceHost'      : DIRECTORY_INSTANCE_HOST ,
                        'dsInstancePort'      : DIRECTORY_INSTANCE_PORT ,
                        'dsInstanceDn'        : DIRECTORY_INSTANCE_DN ,
                        'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
                        'dsBaseDN'            : 'cn=bad,cn=config' ,
                        'dsFilter'            : 'objectclass=*' }
                    </call>
                    <call function="'checktestRC'">
                      {'returncode' : RC ,
                       'result'     : STAXResult,
                       'expected'   : 32 }
                    </call>
                    <call function="'testCase_Postamble'"/>
                  </sequence>
                 </testcase>
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/clu_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'clu_cleanup'"> { 'stopDS' : True } </call>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/functional-tests/testcases/clu/clu_cleanup.xml
New file
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="clu_cleanup"/>
  <function name="clu_cleanup">
    <function-map-args>
      <function-arg-def name="stopDS" type="optional" default="True">
        <function-arg-description>
          Optional stop the Directory Server
        </function-arg-description>
        <function-arg-property name="type" value="boolean"/>
      </function-arg-def>
    </function-map-args>
    <sequence>
      <block name="'cleanup'">
        <sequence>
          <if expr="stopDS == True">
          <block name="'Block DS Process Stop'">
          <!--- Stop DS -->
            <sequence>
              <message>
                 'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
              </message>
              <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                  'dsHost'    : DIRECTORY_INSTANCE_HOST,
                  'dsPort'    : DIRECTORY_INSTANCE_PORT,
                  'dsBindDN'  : DIRECTORY_INSTANCE_DN,
                  'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
              </call>
              <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
            </sequence>
          <!--- End Block DS Process Stop -->
          </block>
          </if>
          <block name="'Block Remove DS Topology'">
          <!-- Remove  the topology created for the test suite -->
            <sequence>
              <message>
                 'Remove DS topology created for the Test Suite'
              </message>
              <call function="'removeTopology'"/>
              <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
            </sequence>
          <!-- End Block Remove DS Topology-->
          </block>
        </sequence>
      </block>
     </sequence>
  </function>
</stax>
opends/tests/functional-tests/testcases/clu/clu_setup.xml
New file
@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="clu_setup"/>
  <function name="clu_setup">
    <sequence>
      <block name="'setup'">
        <sequence>
          <block name="'Block Create DS Topology'">
          <!-- Create the topology necessary to the test group/suite -->
            <sequence>
              <message>
                 'Create DS topology as described in config.py'
              </message>
              <call function="'createTopology'">
                { 'initialiseInstance' : True }
              </call>
              <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
            </sequence>
          <!--- End Block Create DS Topology -->
          </block>
          <block name="'Block DS Process Active'">
          <!--- Start DS -->
            <sequence>
              <message>
                 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
              </message>
              <!--- Start DS -->
              <call function="'StartDsWithScript'">
               { 'location'  : STAF_REMOTE_HOSTNAME }
              </call>
              <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
              <!--- Check that DS started -->
              <call function="'isAlive'">
                { 'noOfLoops'        : 5 ,
                  'noOfMilliSeconds' : 2000 }
              </call>
            </sequence>
          <!--- End Block DS Process Active -->
          </block>
          <block name="'Block DS Load Data'">
          <!-- Load the data needed by the test suite -->
      <sequence>
              <message>
                 'Add many entries needed for Testcase 18 in cluSearch tests'
              </message>
              <call function="'addEntry'">
                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                  'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                  'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                  'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                  'entryToBeAdded'   : '%s/clu/data/clu_start.ldif' % logsRemoteDataDir }
              </call>
              <message>
                 'Add entries for cluSearch Tests'
              </message>
              <call function="'addEntry'">
                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                  'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                  'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                  'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                  'entryToBeAdded'   : '%s/clu/data/ldif_mod.ldif' % logsRemoteDataDir }
              </call>
              <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
      </sequence>
          <!-- End Block DS Load Data -->
          </block>
        </sequence>
      </block>
     </sequence>
  </function>
</stax>
opends/tests/functional-tests/testcases/clu/clu_setup_sav.xml
New file
@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="clu_setup"/>
  <function name="clu_setup">
    <function-map-args>
      <function-arg-def name="startDS" type="optional" default="True">
        <function-arg-description>
          Optional start the Directory Server
        </function-arg-description>
        <function-arg-property name="type" value="boolean"/>
      </function-arg-def>
      <function-arg-def name="loadBackend" type="optional" default="False">
        <function-arg-description>
          Specifies whether the backend should be loaded with some data.
        </function-arg-description>
        <function-arg-property name="type" value="boolean"/>
      </function-arg-def>
    </function-map-args>
    <sequence>
      <block name="'setup'">
        <sequence>
          <block name="'Block Create DS Topology'">
          <!-- Create the topology necessary to the test group/suite -->
            <sequence>
              <message>
                 'Create DS topology as described in config.py'
              </message>
              <call function="'createTopology'">
                { 'initialiseInstance' : True }
              </call>
              <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
            </sequence>
          <!--- End Block Create DS Topology -->
          </block>
          <if expr="loadBackend == True">
          <block name="'Block DS Load Data'">
          <!-- Load the data needed by the test suite -->
            <sequence>
              <message>
                'Clu: Clu Setup for cluSearch, cluModify, cluDelete, and cluCompare Tests'
              </message>
              <call function="'importLdif'">
                { 'ldifFile'    : '%s/clu/data/ldif_mod.ldif' % STAGED_DATA_DIR }
              </call>
              <call function="'checkRC'">
                { 'returncode' : RC ,
                  'result'     : STAXResult }
              </call>
            </sequence>
          <!--- End Block DS Load Data -->
          </block>
          </if>
          <if expr="startDS == True">
          <block name="'Block DS Process Active'">
          <!--- Start DS -->
            <sequence>
              <message>
                 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
              </message>
              <!--- Start DS -->
              <call function="'StartDsWithScript'">
               { 'location'  : STAF_REMOTE_HOSTNAME }
              </call>
              <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
              <!--- Check that DS started -->
              <call function="'isAlive'">
                { 'noOfLoops'        : 5 ,
                  'noOfMilliSeconds' : 2000 }
              </call>
            </sequence>
          <!--- End Block DS Process Active -->
          </block>
          </if>
        </sequence>
      </block>
     </sequence>
  </function>
</stax>
opends/tests/functional-tests/testcases/clu/commands.xml
New file
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, exclude this CDDL HEADER in each
 ! file and exclude the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_commands"/>
  <function name="main_commands">
    <sequence>
      <block name="'clu'">
        <sequence>
          <script>
            CurrentTestPath['group']='clu'
          </script>
          <call function="'testGroup_Preamble'"/>
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/cluSearch.xml' % (TESTS_DIR)"/>
          <call function="'main_cluSearch'" />
       <!--   <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/cluModify.xml' % (TESTS_DIR)"/>
          <call function="'main_cluModify'" /> -->
          <!-- <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/cluCompare.xml' % (TESTS_DIR)"/>
          <call function="'main_cluCompare'" />
          <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
            file="'%s/testcases/clu/cluDelete.xml' % (TESTS_DIR)"/>
          <call function="'main_cluDelete'" /> -->
          <call function="'testGroup_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>