<?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 legal-notices/CDDLv1_0.txt
! or http://forgerock.org/license/CDDLv1.0.html.
! 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 legal-notices/CDDLv1_0.txt.
! 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
!
! Copyright 2008-2009 Sun Microsystems, Inc.
! Portions Copyright 2013 ForgeRock AS
! -->
<stax>
<defaultcall function="clu_ldapsearch_checkoptions"/>
<function name="clu_ldapsearch_checkoptions">
<sequence>
<block name="'clu_ldapsearch_checkoptions'">
<try>
<sequence>
<!--- Test Suite information
#@TestSuiteName ldapsearch check options tests
#@TestSuitePurpose Test the ldapsearch command with
common options and input/output options.
#@TestSuiteGroup ldapsearch check options tests
#@TestScript clu_ldapsearch_checkoptions.xml
-->
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group'] = 'clu'
CurrentTestPath['suite'] = STAXCurrentBlock
</script>
<call function="'testSuite_Preamble'"/>
<call function="'common_setup'">
{
'quickStart' : False ,
'loadData' : True ,
'ldifFile' : '%s/clu/clu_start.ldif' % remote.data ,
'startServer' : True ,
'stopServer' : False ,
'allowPreEncodePassword' : True
}
</call>
<!--- Define default value for basedn and dsfilter -->
<script>
basedn = 'ou=ldapsearch,o=clu tests,dc=example,dc=com'
dsfilter = 'uid=user.10*'
</script>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: correct options
#@TestIssue none
#@TestPurpose Test ldapsearch with correct options.
#@TestPreamble none
#@TestStep Do an ldapsearch with correct options.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName('ldapsearch: correct options')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: correct options'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: empty hostname
#@TestIssue none
#@TestPurpose Verify a parameter error doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with an empty hostname.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 89.
-->
<testcase name="getTestCaseName('ldapsearch: empty hostname')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: empty hostname'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : ' ' ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter ,
'expectedRC' : 89
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: invalid hostname
#@TestIssue none
#@TestPurpose Verify a connection error doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with an invalid hostname.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 91.
-->
<testcase name="getTestCaseName('ldapsearch: invalid hostname')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: invalid hostname'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : 'bad_host' ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter ,
'expectedRC' : 91
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: no port and no basedn
#@TestIssue none
#@TestPurpose Verify a connection error doing an
ldapsearch without the port option (default
port is 389)
#@TestPreamble none
#@TestStep Do an ldapsearch with no port and no basedn.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 91.
-->
<testcase name="getTestCaseName('ldapsearch: no port and no basedn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: no port and no basedn'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilter' : dsfilter ,
'expectedRC' : 91
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: invalid port number and no basedn
#@TestIssue none
#@TestPurpose Verify a parameter error doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with invalid port number
and no basedn used.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 89.
-->
<testcase name="getTestCaseName
('ldapsearch: invalid port number and no basedn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: invalid port number and no basedn'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : '-1' ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilter' : dsfilter ,
'expectedRC' : 89
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: invalid binddn
#@TestIssue none
#@TestPurpose Verify an invalid credentials error
doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with an invalid binddn.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 49.
-->
<testcase name="getTestCaseName('ldapsearch: invalid binddn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: invalid binddn'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'cn=bad dn' ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter ,
'expectedRC' : 49
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: no password provided
#@TestIssue none
#@TestPurpose Verify an inappropriate authentication error
doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch without a password.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 48.
-->
<!-- This test is prompting for the password -->
<!--- Comment out this testcase as it hangs on some platform -->
<!---
<testcase name="getTestCaseName('ldapsearch: no password provided')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: no password provided'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter ,
'expectedRC' : 48
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
-->
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: invalid password
#@TestIssue none
#@TestPurpose Verify a parameter error doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with an invalid password.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 49.
-->
<testcase name="getTestCaseName('ldapsearch: invalid password')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: invalid password'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : 'bad_password' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter ,
'expectedRC' : 49
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: scope with no option-argument
#@TestIssue none
#@TestPurpose Verify an invalid credentials error
doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with a scope and no value.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 89.
-->
<testcase name="getTestCaseName
('ldapsearch: scope with no option-argument')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: scope with no option-argument'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsScope' : ' ' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter ,
'expectedRC' : 89
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: invalid scope
#@TestIssue none
#@TestPurpose Verify a parameter error doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with an invalid scope.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 89.
-->
<testcase name="getTestCaseName('ldapsearch: invalid scope')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: invalid scope'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsScope' : 'bad_scope' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter ,
'expectedRC' : 89
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: empty basedn
#@TestIssue none
#@TestPurpose Verify a parameter error doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with an empty basedn.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 89.
-->
<testcase name="getTestCaseName('ldapsearch: empty basedn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: empty basedn'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : ' ' ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: invalid basedn
#@TestIssue none
#@TestPurpose Verify a no such object error
doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with an invalid basedn.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 32.
-->
<testcase name="getTestCaseName('ldapsearch: invalid basedn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: invalid basedn'
</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' : dsfilter ,
'expectedRC' : 32
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: no filter
#@TestIssue none
#@TestPurpose Verify a parameter error doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch without a filter.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 89.
-->
<testcase name="getTestCaseName('ldapsearch: no filter')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: no filter'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : basedn ,
'expectedRC' : 89
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: dry run option
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with dry run option.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName('ldapsearch: dry run option')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: dry run option'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsDryRun' : 'True' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: verbose option
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the verbose option.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName('ldapsearch: verbose option')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: verbose option'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsVerbose' : 'True' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: timelimit of 20 seconds
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with timelimit of 20
seconds option.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName
('ldapsearch: timelimit of 20 seconds')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: timelimit of 20 seconds'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsTimeLimit' : '20' ,
'dsBaseDN' : basedn ,
'dsFilter' : '(&amp;(uid=*)(mobile=*))' ,
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: timelimit of 1 second
#@TestIssue none
#@TestPurpose Verify a time limit error doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with timelimit of 1 second.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 3.
-->
<!---
<testcase name="getTestCaseName
('ldapsearch: timelimit of 1 second')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: timelimit of 1 second'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsTimeLimit' : '1' ,
'dsBaseDN' : basedn ,
'dsFilter' : '(&amp;(uid=*)(mobile=*))' ,
'expectedRC' : 3
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
-->
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: sizelimit of 100 entries
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with sizelimit option.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName
('ldapsearch: sizelimit of 100 entries')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: sizelimit of 100 entries'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsSizeLimit' : '100' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: sizelimit of 1 entries
#@TestIssue none
#@TestPurpose Verify a size limit error doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the sizelimit option.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 4.
-->
<testcase name="getTestCaseName
('ldapsearch: sizelimit of 1 entries')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: sizelimit of 1 entries'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsSizeLimit' : '1' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter ,
'expectedRC' : 4
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: help option
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the help option.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName('ldapsearch: help option')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: help option'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsHelp' : 'True' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: don't wrap option
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the do do not wrap
long lines option.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName(
'ldapsearch: do not wrap long lines option')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: do not wrap long lines option'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsDontWrap' : 'True' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: attribute value only option
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the attribute value
only option.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName
('ldapsearch: attribute value only option')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: attribute value only option'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsTypesOnly' : 'True' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: sort order option of uid
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the a sort order of uid.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName
('ldapsearch: sort order option of uid')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: sort order option of uid'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsSortOrder' : 'uid' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: sort order option of bad
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the a sort order of bad.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName
('ldapsearch: sort order option of bad')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: sort order option of bad '
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsSortOrder' : 'bad_sort' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: dereference policy of always
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the a dereference
policy of always.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 0.
-->
<testcase name="getTestCaseName
('ldapsearch: dereference policy of always')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: dereference policy of always'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsDereferencePolicy' : 'always' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: dereference policy of bad
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the a dereference
policy of bad.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 89.
-->
<testcase name="getTestCaseName
('ldapsearch: dereference policy of bad')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: dereference policy of bad'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsDereferencePolicy' : 'bad_ref' ,
'dsBaseDN' : basedn ,
'dsFilter' : dsfilter ,
'expectedRC' : 89
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: invalid basedn
#@TestIssue none
#@TestPurpose Verify a no such object error
doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the a bad base dn.
#@TestPostamble none
#@TestResult Success if ldapsearch returns 32.
-->
<testcase name="getTestCaseName('ldapsearch: invalid basedn')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: invalid basedn'
</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=*' ,
'expectedRC' : 32
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker ldapsearch check options tests
#@TestName ldapsearch: simple page size of 0
#@TestIssue none
#@TestPurpose Verify a parameter doing an ldapsearch.
#@TestPreamble none
#@TestStep Do an ldapsearch with the a simple page size
of 0
#@TestPostamble none
#@TestResult Success if ldapsearch returns 89.
-->
<testcase name="getTestCaseName
('ldapsearch: simple page size of 0')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ldapsearch: simple page size of 0'
</message>
<call function="'ldapSearchWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsSimplePageSize' : '0' ,
'dsBaseDN' : basedn ,
'dsFilter' : 'objectclass=*' ,
'expectedRC' : 89
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
<finally>
<sequence>
<!-- Test Suite Cleanup -->
<message>'Finally: Global CLU Cleanup.'</message>
<try>
<call function="'common_cleanup'" />
<catch exception="'STAFException'">
<sequence>
<message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
</sequence>
</catch>
<finally>
<call function="'testSuite_Postamble'"/>
</finally>
</try>
</sequence>
</finally>
</try>
</block>
</sequence>
</function>
</stax>