modify_rdn_tests.xml revision e75c2484bff064fbbf51e92aed4f37b08e6427b7
<?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
!
! Copyright 2008-2010 Sun Microsystems, Inc.
! Portions Copyright 2011-2013 ForgeRock AS.
! -->
<stax>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Preamble
#@TestIssue none
#@TestPurpose Add additional entries
#@TestPreamble none
#@TestStep Directory Manager adds additional entries.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all operations.
-->
<function name="aci_modify_rdn_001" scope="local">
<testcase name="getTestCaseName('Modify RDN Preamble')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<message>
'ACI: Modify RDN: Preamble - Adding Entries For Modify RDN 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_modify_rdn/aci_startup_modrdn_tests.ldif' % remote.data }
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Leaf - targetattr=* and userdn=all
#@TestIssue none
#@TestPurpose Modifies an rdn of a leaf with targetattr=* and userdn=all
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for steps 1 and 2, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_002" scope="local">
<testcase name="getTestCaseName('Leaf - targetattr=* and userdn=all')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci1.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Leaf - targetattr=* and userdn=all, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr=* and userdn=all, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry1.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr=* and userdn=all, user searching targeted entry, new rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=newtmorris, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=newtmorris,ou=People,ou=branch one,ou=aci branch,o=Modify RDN Tests' }
</call>
<if expr="returnCode != '1'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Modify RDN: Leaf - targetattr=* and userdn=all, user searching targeted entry, old rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=tmorris, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn',
'expectedRC' : 32
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr=* and userdn=all, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry1a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr=* and userdn=all, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr=* and userdn=all, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Branch - targetattr=* and userdn=all
#@TestIssue none
#@TestPurpose Modifies an rdn of a branch with targetattr=* and userdn=all
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Admin restores the branch to the old rdn.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for steps 1, 2 and 4, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_003" scope="local">
<testcase name="getTestCaseName('Branch - targetattr=* and userdn=all')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci2.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Branch - targetattr=* and userdn=all, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr=* and userdn=all, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry2.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr=* and userdn=all, user searching targeted entry, new rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=New People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=kvaughan,ou=New People,ou=branch one,ou=aci branch,o=Modify RDN Tests' }
</call>
<if expr="returnCode != '1'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Modify RDN: Branch - targetattr=* and userdn=all, user searching targeted entry, old rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn',
'expectedRC' : 32
}
</call>
<message>
'ACI: Modify RDN: Branch - targetattr=* and userdn=all, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry2a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Branch - targetattr=* and userdn=all, user restoring branch in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_restore2.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr=* and userdn=all, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr=* and userdn=all, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify Entry Tests
#@TestName Leaf - targetattr equals three attributes with uid
#@TestIssue none
#@TestPurpose Modify an rdn where targetattr equals three attributes with uid
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for steps 1 and 2, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_004" scope="local">
<testcase name="getTestCaseName('Leaf - targetattr equals three attributes with uid')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci3.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes with uid, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes with uid, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry3.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes with uid, user searching targeted entry, new rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=newdmiller, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=newdmiller,ou=People,ou=branch one,ou=aci branch,o=Modify RDN Tests' }
</call>
<if expr="returnCode != '1'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes with uid, user searching targeted entry, old rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=dmiller, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn',
'expectedRC' : 32
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes with uid, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry3a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes with uid, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes with uid, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify Entry Tests
#@TestName Leaf - targetattr equals three attributes without uid
#@TestIssue none
#@TestPurpose Modify an rdn where targetattr equals three attributes without uid
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies an rdn of an entry in the targeted branch.
#@TestStep Client modifies an rdn of an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client modifies an rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for step 1, and
50 for all other steps.
-->
<function name="aci_modify_rdn_005" scope="local">
<testcase name="getTestCaseName('Leaf - targetattr equals three attributes without uid')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci4.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes without uid, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes without uid, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry4.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes without uid, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry4a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes without uid, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr equals three attributes without uid, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify Entry Tests
#@TestName Branch - targetattr with three attributes equals ou
#@TestIssue none
#@TestPurpose Modify an attribute where targetattr equals equals ou
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Admin restores the branch to the old rdn.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for steps 1 and 2, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_006" scope="local">
<testcase name="getTestCaseName('Branch - targetattr with three attributes equals ou')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci5.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes equals ou, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes equals ou, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry5.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes equals ou, user searching targeted entry, new rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=New People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=kvaughan,ou=New People,ou=branch one,ou=aci branch,o=Modify RDN Tests' }
</call>
<if expr="returnCode != '1'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes equals ou, user searching targeted entry, old rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn',
'expectedRC' : 32
}
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes equals ou, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry5a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes equals ou, user restoring branch in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_restore2.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes equals ou, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes equals ou, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify Entry Tests
#@TestName Branch - targetattr with three attributes not equals ou
#@TestIssue none
#@TestPurpose Modify an attribute where targetattr with three attributes not equals ou
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies an attribute value in an entry in the targeted branch.
#@TestStep Client modifies an attribute value in an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client modifies an attribute value in an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations, and
50 for all other steps.
-->
<function name="aci_modify_rdn_007" scope="local">
<testcase name="getTestCaseName('Branch - targetattr with three attributes not equals ou')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci6.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes not equals ou, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes not equals ou, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry6.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes not equals ou, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry6a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes not equals ou, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - targetattr with three attributes not equals ou, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Leaf - Multi ACIs, allow and deny
#@TestIssue none
#@TestPurpose Modifies an rdn of a leaf with some entries allowed and some entries denied
#@TestPreamble Admin adds multiple acis.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is in the targeted branch but prohibited.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for steps 1 and 2, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_008" scope="local">
<testcase name="getTestCaseName('Leaf - Multi ACIs, allow and deny')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci7.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Leaf - Multi ACIs, allow and deny, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Leaf - Multi ACIs, allow and deny, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry7.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - Multi ACIs, allow and deny, user searching targeted entry, new rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=newtrigden, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=newtrigden,ou=People,ou=branch one,ou=aci branch,o=Modify RDN Tests' }
</call>
<if expr="returnCode != '1'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Modify RDN: Leaf - Multi ACIs, allow and deny, user searching targeted entry, old rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=trigden, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn',
'expectedRC' : 32
}
</call>
<message>
'ACI: Modify RDN: Leaf - Multi ACIs, allow and deny, user modifying prohibited entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry7.1.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - Multi ACIs, allow and deny, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry7a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - Multi ACIs, allow and deny, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - Multi ACIs, allow and deny, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Branch - Multi ACIs, deny write on new branch
#@TestIssue none
#@TestPurpose Modifies an rdn of a branch where new branch has a deny write
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Client restores the branch to the old rdn.
#@TestStep Admin replaces the aci.
#@TestStep Client restores the branch to the old rdn.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for steps 1, 2 and 7, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_009" scope="local">
<testcase name="getTestCaseName('Branch - Multi ACIs, deny write on new branch')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci8.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry8.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, user searching targeted entry, new rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=People, ou=branch two, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=kvaughan,ou=People,ou=branch two,ou=aci branch,o=Modify RDN Tests' }
</call>
<if expr="returnCode != '1'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, user searching targeted entry, old rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn',
'expectedRC' : 32
}
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry8a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, user restoring branch in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_restore3.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, preamble replacing 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_modify_rdn/replace_modrdn_aci8.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, user restoring branch in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_restore3.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify Entry Tests
#@TestName Leaf - targetattr with three attributes not equals uid, delete old rdn
#@TestIssue none
#@TestPurpose Modify an rdn where targetattr with three attributes not equals uid, delete old rdn
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies an rdn of an entry in the targeted branch.
#@TestStep Client modifies an rdn of an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client modifies an rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for step 1, and
50 for all other steps.
-->
<function name="aci_modify_rdn_010" scope="local">
<testcase name="getTestCaseName('Leaf - targetattr with three attributes not equals uid, delete old rdn')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci9.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, delete old rdn, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, delete old rdn, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry9.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, delete old rdn, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry9a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, delete old rdn, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, delete old rdn, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Leaf - targetattr with three attributes not equals uid, don't delete old rdn
#@TestIssue none
#@TestPurpose Modifies an rdn of an entry with targetattr with three attributes not equals uid, don't delete old rdn
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for steps 1 and 2, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_011" scope="local">
<testcase name="getTestCaseName('Leaf - targetattr with three attributes not equals uid, dont delete old rdn')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci10.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, dont delete old rdn, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, dont delete old rdn, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry10.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, dont delete old rdn, user searching targeted entry, new rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'sn=wallace, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: sn=wallace,ou=People,ou=branch one,ou=aci branch,o=Modify RDN Tests' }
</call>
<if expr="returnCode != '1'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, dont delete old rdn, user searching targeted entry, old rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=jwallace, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn',
'expectedRC' : 32
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, dont delete old rdn, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry10a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, dont delete old rdn, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals uid, dont delete old rdn, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Leaf - targetattr with three attributes not equals sn and cn, dont delete old rdn
#@TestIssue none
#@TestPurpose Modifies an rdn of an entry with leaf with targetattr with three attributes not equals sn and cn, dont delete old rdn
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_012" scope="local">
<testcase name="getTestCaseName('Leaf - targetattr with three attributes not equals sn and cn, dont delete old rdn')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci11.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals sn and cn, dont delete old rdn, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals sn and cn, dont delete old rdn, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry11.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals sn and cn, dont delete old rdn, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry11a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals sn and cn, dont delete old rdn, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Leaf - targetattr with three attributes not equals sn and cn, dont delete old rdn, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Branch - Multi ACIs, targattrfilters add:ou, del:ou
#@TestIssue none
#@TestPurpose Modifies an rdn of a branch where targattrfilters add:ou, del:ou
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Admin restores the branch to the old rdn.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for steps 1, 2 and 4, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_013" scope="local">
<testcase name="getTestCaseName('Branch - Multi ACIs, targattrfilters add:ou, del:ou')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci21.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry21.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou, user searching targeted entry, new rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=People, ou=branch two, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=kvaughan,ou=People,ou=branch two,ou=aci branch,o=Modify RDN Tests' }
</call>
<if expr="returnCode != '1'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou, user searching targeted entry, old rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn',
'expectedRC' : 32
}
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry21a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou, user restoring branch in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_restore3.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Branch - Multi ACIs, targattrfilters add:ou, del:ou 2
#@TestIssue none
#@TestPurpose Modifies an rdn of a branch where targattrfilters add:ou, del:ou
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client modifies the rdn of an entry in the targeted branch.
#@TestStep Admin searches for the entry with the new rdn.
#@TestStep Admin searches for the entry with the old rdn.
#@TestStep Client modifies the rdn of an entry that is not in the targeted branch.
#@TestStep Client restores the branch to the old rdn.
#@TestStep Admin replaces the aci.
#@TestStep Client restores the branch to the old rdn.
#@TestStep Remove aci.
#@TestStep Client modifies the rdn of an entry in the previously targeted branch.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for ACI add and delete operations,
0 for steps 1, 2 and 7, and
50 or 32 for all other steps.
-->
<function name="aci_modify_rdn_014" scope="local">
<testcase name="getTestCaseName('Branch - Multi ACIs, targattrfilters add:ou, del:ou 2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_modrdn_aci22.ldif'
curr_aci=retrieve_aci('%s/aci/aci_modify_rdn/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou 2, 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_modify_rdn/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou 2, user modifying entry from targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry22.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou 2, user searching targeted entry, new rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=People, ou=branch two, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn'}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
'testString' : 'dn: uid=kvaughan,ou=People,ou=branch two,ou=aci branch,o=Modify RDN Tests' }
</call>
<if expr="returnCode != '1'">
<tcstatus result="'fail'"/>
</if>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou 2, user searching targeted entry, old rdn'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kvaughan, ou=People, ou=branch one, ou=aci branch, o=Modify RDN Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'attributes' : 'cn',
'expectedRC' : 32
}
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou 2, user modifying entry from non-targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_entry22a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou 2, user restoring branch in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_restore4.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, preamble replacing 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_modify_rdn/replace_modrdn_aci22.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, deny write on new branch, user restoring branch in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/modrdn_restore4.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou 2, 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_modify_rdn/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Modify RDN: Branch - Multi ACIs, targattrfilters add:ou, del:ou 2, user modifying entry in previously targeted branch'
</message>
<call function="'modifyEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeModified' : '%s/aci/aci_modify_rdn/mod_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Modify RDN Tests
#@TestName Postamble
#@TestIssue none
#@TestPurpose Remove entries
#@TestPreamble none
#@TestStep Directory Manager removes entries that were used for testing.
#@TestPostamble none
#@TestResult Success if OpenDS returns 0.
-->
<function name="aci_modify_rdn_015" scope="local">
<testcase name="getTestCaseName('Modify RDN Postamble')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<message>
'ACI: Modify RDN: Postamble - delete branch, o=Modify RDN Tests'
</message>
<call function="'DeleteEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'o=Modify RDN Tests, o=ACI Tests,dc=example,dc=com' ,
'extraParams' : '-x'}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
</stax>