core_search_sizelimit.xml revision d58daae6dafda525a320cd0e65807004a54f36af
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
! 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
! 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
!
! Copyright 2006-2009 Sun Microsystems, Inc.
! -->
<stax>
<defaultcall function="core_search_sizelimit" />
<function name="core_search_sizelimit">
<sequence>
<block name="'search-sizelimit'">
<try>
<sequence>
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group']='core'
CurrentTestPath['suite']=STAXCurrentBlock
</script>
<call function="'testSuite_Preamble'" />
<call function="'common_setup'">
{
'quickStart' : False,
'startServer' : True,
'stopServer' : False,
'loadData' : True,
}
</call>
<!--- Test Case : Search Size Limit: Size Limit Exceeded -->
<testcase name="getTestCaseName('Size Limit Exceeded')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL1: Check the response of OpenDS when an ldap search request is conducted with a search size limit defined in the command line and the search size is exceeed '
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : server.host,
'dsInstancePort' : server.port,
'dsInstanceDn' : server.dn,
'dsInstancePswd' : server.password,
'dsBaseDN' : 'ou=People,o=core tests,dc=example,dc=com',
'dsFilter' : 'objectclass=*',
'extraParams' : '-z 150',
'expectedRC' : 4
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: Size Limit Not Exceeded -->
<testcase name="getTestCaseName('Size Limit Not Exceeded')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL2: Check the response of OpenDS when an ldap search request is conducted with a search size limit defined in the command line and the search size is not exceeed'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : server.host,
'dsInstancePort' : server.port,
'dsInstanceDn' : server.dn,
'dsInstancePswd' : server.password,
'dsBaseDN' : 'ou=People,o=core tests,dc=example,dc=com',
'dsFilter' : 'objectclass=*',
'extraParams' : '-z 151'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: Server Wide Size Limit 5 -->
<testcase name="getTestCaseName('Server Wide Size Limit 5')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL3: Change the server-wide search size limit to 5'
</message>
<call function="'modifyGlobal'">
{ 'dsInstanceHost' : server.host,
'dsInstanceDn' : server.dn,
'dsInstancePswd' : server.password,
'attributeName' : 'size-limit',
'attributeValue' : '5'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC,
'result' : STAXResult
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: Server Wide Size Limit Exceeded -->
<testcase name="getTestCaseName('Server Wide Size Limit Exceeded')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL4: Check the response of OpenDS when an ldap search request is conducted with a search size limit defined by the server-wide parameter, ds-cfg-size-limit, and the search size limit is exceeded'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : server.host,
'dsInstancePort' : server.port,
'dsBaseDN' : 'ou=People,o=core tests,dc=example,dc=com',
'dsFilter' : 'objectclass=*',
'expectedRC' : 4
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: Server Wide Size Limit 1000-->
<testcase name="getTestCaseName('Server Wide Size Limit 1000')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL5: Change the server-wide search size limit to 1000'
</message>
<call function="'modifyGlobal'">
{ 'dsInstanceHost' : server.host,
'dsInstanceDn' : server.dn,
'dsInstancePswd' : server.password,
'attributeName' : 'size-limit',
'attributeValue' : '1000'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: Server Wide Size Limit Not Exceeded -->
<testcase name="getTestCaseName('Server Wide Size Limit Not Exceeded')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL6: Check the response of OpenDS when an ldap search request is conducted with a search size limit defined by the server-wide parameter, ds-cfg-size-limit, and the search size limit is not exceeded'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : server.host,
'dsInstancePort' : server.port,
'dsBaseDN' : 'ou=People,o=core tests,dc=example,dc=com',
'dsFilter' : 'objectclass=*'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: Directory Manager Size Limit 5 -->
<testcase name="getTestCaseName('Directory Manager Size Limit 5')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL7: Change the search size limit for cn=Directory Manager to 5'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : server.host,
'dsInstancePort' : server.port,
'dsInstanceDn' : server.dn,
'dsInstancePswd' : server.password,
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: User Specific Size Limit Exceeded -->
<testcase name="getTestCaseName('User Specific Size Limit Exceeded')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL8: Check the response of OpenDS when an ldap search request is conducted with a user search size limit defined by the user-specific parameter, ds-rlim-size-limit, and the search size limit is exceeded'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : server.host,
'dsInstancePort' : server.port,
'dsInstanceDn' : server.dn,
'dsInstancePswd' : server.password,
'dsBaseDN' : 'ou=People,o=core tests,dc=example,dc=com',
'dsFilter' : 'objectclass=*',
'expectedRC' : 4
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: Size Limit Not Applicable -->
<testcase name="getTestCaseName('Size Limit Not Applicable')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL9: Check the response of OpenDS when an ldap search request is conducted with a user search size limit defined by the user-specific parameter, ds-rlim-size-limit, and the search is conducted as a bind to a different user'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : server.host,
'dsInstancePort' : server.port,
'dsBaseDN' : 'ou=People,o=core tests,dc=example,dc=com',
'dsFilter' : 'objectclass=*'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: Modify Directory Manager Limit 0 -->
<testcase name="getTestCaseName('Modify Directory Manager Limit 0')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL10: Change the search size limit for cn=Directory Manager to 0'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : server.host,
'dsInstancePort' : server.port,
'dsInstanceDn' : server.dn,
'dsInstancePswd' : server.password,
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
<!--- Test Case : Search Size Limit: No Size Limit -->
<testcase name="getTestCaseName('No Size Limit')">
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Core SSzL11: Check the response of OpenDS when an ldap search request is conducted with a user search size limit defined as "unlimited" by the user-specific parameter, ds-rlim-size-limit, equal to -1 and the search is against 1150 entries'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : server.host,
'dsInstancePort' : server.port,
'dsInstanceDn' : server.dn,
'dsInstancePswd' : server.password,
'dsBaseDN' : 'ou=People,o=core tests,dc=example,dc=com',
'dsFilter' : 'objectclass=*'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'testCase_Postamble'" />
</sequence>
</testcase>
</sequence>
<finally>
<sequence>
<!-- Test Suite Cleanup -->
<message>'Finally: Global ACI 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>