aci_targetscope.xml revision d81f6d00c343633159fc5ea08599d145135612c0
074f2520bc04a7a93b4123bc58fb40055c9174d2hajma<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
074f2520bc04a7a93b4123bc58fb40055c9174d2hajma<!--
3e8ebc69e18e02f0935b37e8f5837aab18557f50ludovicp ! CDDL HEADER START
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma !
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! The contents of this file are subject to the terms of the
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! Common Development and Distribution License, Version 1.0 only
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! (the "License"). You may not use this file except in compliance
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! with the License.
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma !
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! You can obtain a copy of the license at
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! See the License for the specific language governing permissions
3e8ebc69e18e02f0935b37e8f5837aab18557f50ludovicp ! and limitations under the License.
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma !
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! When distributing Covered Code, include this CDDL HEADER in each
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! file and include the License file at
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
3e8ebc69e18e02f0935b37e8f5837aab18557f50ludovicp ! add the following below this CDDL HEADER, with the fields enclosed
074f2520bc04a7a93b4123bc58fb40055c9174d2hajma ! by brackets "[]" replaced with your own identifying information:
074f2520bc04a7a93b4123bc58fb40055c9174d2hajma ! Portions Copyright [yyyy] [name of copyright owner]
f30ee734ac0ee8b792c77ab3bc42494fcddb1508hajma !
074f2520bc04a7a93b4123bc58fb40055c9174d2hajma ! CDDL HEADER END
3e8ebc69e18e02f0935b37e8f5837aab18557f50ludovicp !
074f2520bc04a7a93b4123bc58fb40055c9174d2hajma ! Copyright 2008-2010 Sun Microsystems, Inc.
074f2520bc04a7a93b4123bc58fb40055c9174d2hajma ! -->
<stax>
<defaultcall function="aci_targetscope"/>
<function name="aci_targetscope">
<sequence>
<block name="'aci-target-scope'">
<sequence>
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group']='aci'
CurrentTestPath['suite']=STAXCurrentBlock
</script>
<call function="'testSuite_Preamble'"/>
<!---
Place suite-specific test information here.
#@TestSuiteName ACI Targetscope Tests
#@TestSuitePurpose Test the basic ACI Targetscope Support.
#@TestSuiteGroup Basic ACI Targetscope Tests
#@TestScript aci_targetscope.xml
-->
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/aci/aci_setup.xml' % (TESTS_DIR)"/>
<call function="'aci_setup'" />
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Targetscope Tests
#@TestName Preamble
#@TestIssue none
#@TestPurpose Test default aci settings
#@TestPreamble none
#@TestStep Admin removes global search ACI.
#@TestStep Admin adds entries for the test cases.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
and no entries are returned
for all operations.
-->
<!-- cross reference to http://docs.sun.com/source/816-6698-10/aci.html -->
<!-- cross reference to DS6 docs -->
<testcase name="getTestCaseName('Preamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ACI: Targetscope: Preamble - Removing Search Global ACI'
</message>
<call function="'modifyGlobalAci'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'aciValue' : GLOBAL_ACI_SEARCH ,
'opType' : 'remove' }
</call>
<message>
'ACI: Targetscope: Preamble - Adding Entries For Targetscope Tests'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeAdded' : '%s/aci/aci_targetscope/aci_startup_targetscope.ldif' % remote.data }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Bind Type Tests
#@TestName targetscope - base
#@TestIssue none
#@TestPurpose Test behavior of targetscope equals base
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client searches entry in the targeted branch dn for entry with children, parent.
#@TestStep Client searches entry in the targeted branch dn for entry with children, first child.
#@TestStep Client searches entry in the targeted branch dn for entry with children, second child.
#@TestStep Remove aci.
#@TestStep Client searches entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations, and
and parent entry is returned in step 1.
-->
<testcase name="getTestCaseName('base')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci1.ldif'
curr_aci=retrieve_aci('%s/aci/aci_targetscope/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Targetscope: base, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Targetscope: base, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Targetscope: base, user searching in first child level'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Targetscope: base, user searching in second child level'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Targetscope: base, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Targetscope: base, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Bind Type Tests
#@TestName targetscope - onelevel
#@TestIssue none
#@TestPurpose Test behavior of targetscope equals onelevel
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client searches entry in the targeted branch dn for entry with children, parent.
#@TestStep Client searches entry in the targeted branch dn for entry with children, first child.
#@TestStep Client searches entry in the targeted branch dn for entry with children, second child.
#@TestStep Remove aci.
#@TestStep Client searches entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
Child entry are returned in steps 1 and 2.
-->
<testcase name="getTestCaseName('onelevel')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci2.ldif'
curr_aci=retrieve_aci('%s/aci/aci_targetscope/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Targetscope: onelevel, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Targetscope: onelevel, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Targetscope: onelevel, user searching in first child level'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Targetscope: onelevel, user searching in second child level'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<message>
'ACI: Targetscope: onelevel, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Targetscope: onelevel, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Bind Type Tests
#@TestName targetscope - subtree
#@TestIssue none
#@TestPurpose Test behavior of targetscope equals onelevel
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client searches entry in the targeted branch dn for entry with children, parent.
#@TestStep Client searches entry in the targeted branch dn for entry with children, first child.
#@TestStep Client searches entry in the targeted branch dn for entry with children, second child.
#@TestStep Remove aci.
#@TestStep Client searches entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
All entries are returned in steps 1, 2 and 3.
-->
<testcase name="getTestCaseName('subtree')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci3.ldif'
curr_aci=retrieve_aci('%s/aci/aci_targetscope/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Targetscope: subtree, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Targetscope: subtree, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Targetscope: subtree, user searching in first child level'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Targetscope: subtree, user searching in second child level'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Targetscope: subtree, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Targetscope: subtree, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Bind Type Tests
#@TestName targetscope - subordinate
#@TestIssue none
#@TestPurpose Test behavior of targetscope equals onelevel
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client searches entry in the targeted branch dn for entry with children, parent.
#@TestStep Client searches entry in the targeted branch dn for entry with children, first child.
#@TestStep Client searches entry in the targeted branch dn for entry with children, second child.
#@TestStep Remove aci.
#@TestStep Client searches entry with the previously targeted branch dn.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all ldap operations.
All entries except the parent are returned in steps 1, 2 and 3.
-->
<testcase name="getTestCaseName('subordinate')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_aci4.ldif'
curr_aci=retrieve_aci('%s/aci/aci_targetscope/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Targetscope: subordinate, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Targetscope: subordinate, user searching targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '0' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Targetscope: subordinate, user searching in first child level'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Targetscope: subordinate, user searching in second child level'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmillertwo,uid=dmillerone,uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' ,
'expectedResult' : '1' }
</call>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'cn:' ,
'expectedResult' : '1' }
</call>
<message>
'ACI: Targetscope: subordinate, admin deleting aci'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Targetscope: subordinate, user searching previously targeted entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'dsBaseDN' : 'uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn sn uid' ,
'extraParams' : '-T' }
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestStringNotPresent'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=dmiller,ou=People,ou=aci branch,o=Targetscope Tests,o=ACI Tests' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Bind Type Tests
#@TestName targetscope - syntax, bad keyword
#@TestIssue none
#@TestPurpose Test behavior of targetscope equals bad keyword
#@TestPreamble none
#@TestStep Admin adds an aci to the dn of one existing branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 21.
-->
<testcase name="getTestCaseName('bad keyword')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_syntax_aci1.ldif'
curr_aci=retrieve_aci('%s/aci/aci_targetscope/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Targetscope: bad keyword, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/%s' % (remote.data,curr_aci_ldif_file) ,
'expectedRC' : 21
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Bind Type Tests
#@TestName targetscope - syntax, wildcard
#@TestIssue none
#@TestPurpose Test behavior of targetscope equals wildcard
#@TestPreamble none
#@TestStep Admin adds an aci to the dn of one existing branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 21.
-->
<testcase name="getTestCaseName('wildcard')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_syntax_aci2.ldif'
curr_aci=retrieve_aci('%s/aci/aci_targetscope/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Targetscope: wildcard, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/%s' % (remote.data,curr_aci_ldif_file) ,
'expectedRC' : 21
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Bind Type Tests
#@TestName targetscope - syntax, not equals
#@TestIssue none
#@TestPurpose Test behavior of targetscope with not equals
#@TestPreamble none
#@TestStep Admin adds an aci to the dn of one existing branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 21.
-->
<testcase name="getTestCaseName('not equals')">
<sequence>
<call function="'testCase_Preamble'"/>
<script>
curr_aci_ldif_file = 'add_syntax_aci3.ldif'
curr_aci=retrieve_aci('%s/aci/aci_targetscope/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Targetscope: not equals, preamble adding aci,\n %s' % curr_aci
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'entryToBeModified' : '%s/aci/aci_targetscope/%s' % (remote.data,curr_aci_ldif_file) ,
'expectedRC' : 21
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Target Tests
#@TestName Postamble
#@TestIssue none
#@TestPurpose Test default aci settings
#@TestPreamble none
#@TestStep Admin deletes the entries that were used for testing.
#@TestStep Admin puts back the global ACI for searches.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
and no entries are returned
for all operations.
-->
<testcase name="getTestCaseName('Postamble')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'ACI: Targetscope: Postamble - deleting entries'
</message>
<call function="'DeleteEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'o=Targetscope Tests, o=ACI Tests,dc=example,dc=com' ,
'extraParams' : '-x'}
</call>
<message>
'ACI: Targetscope: Resetting Search Global ACI'
</message>
<call function="'modifyGlobalAci'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'aciValue' : GLOBAL_ACI_SEARCH ,
'opType' : 'add' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/aci/aci_cleanup.xml' % (TESTS_DIR)"/>
<call function="'aci_cleanup'" />
<call function="'testSuite_Postamble'"/>
</sequence>
</block>
</sequence>
</function>
</stax>