add_entry_tests.xml revision 75e4d72341a69fa125aeab6e326e49a5422a9eac
<?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 Add Entry Tests
#@TestName Preamble
#@TestIssue none
#@TestPurpose Test default aci settings
#@TestPreamble none
#@TestStep Add extra branches where new entries will be added
#@TestPostamble none
#@TestResult Success if OpenDS returns 0
for all operations.
-->
<function name="aci_add_entry_001" scope="local">
<testcase name="getTestCaseName('Add Entry Preamble')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<message>
'ACI: Add Preamble - Adding Branches For Add 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_add_entry/aci_startup_add_entry_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>
<!-- general allow(add) tests -->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Add Entry Tests
#@TestName Add Entry - userdn equals all
#@TestIssue none
#@TestPurpose Add an entry against an ACi where userdn equals all
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Directory Manager searches for added entry in the targeted branch.
#@TestStep Client adds an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client add 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 for all other steps.
-->
<function name="aci_add_entry_002" scope="local">
<testcase name="getTestCaseName('Add Entry - userdn equals all')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_allow-add_aci1.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - userdn equals 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - userdn equals all, user adding entry to targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_allow-add_entry1.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - userdn equals all, Directory Manager searching added entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=kwinters,ou=People,ou=aci branch,o=Add Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' }
</call>
<message>
'ACI: Add: Add Entry - userdn equals all, user adding entry to non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_allow-add_entry1a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - userdn equals 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - userdn equals all, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - userdn equals a dn
#@TestIssue none
#@TestPurpose Add an entry against an ACI where userdn equals a dn
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Directory Manager searches added entry in the targeted branch.
#@TestStep Client adds an entry in the targeted branch with a prohibited userdn.
#@TestStep Client adds an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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 for all other steps.
-->
<function name="aci_add_entry_003" scope="local">
<testcase name="getTestCaseName('Add Entry - userdn equals a dn')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_allow-add_aci2.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - userdn equals a dn, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - userdn equals a dn, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_allow-add_entry2.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - userdn equals a dn, Directory Manager searching added entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=abergin,ou=People,ou=aci branch,o=Add Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' }
</call>
<message>
'ACI: Add: Add Entry - userdn equals a dn, user adding entry in targeted branch with a prohibited userdn'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=buser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - userdn equals a dn, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_allow-add_entry2a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - userdn equals a dn, 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - userdn equals a dn, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - userdn not equals a dn
#@TestIssue none
#@TestPurpose Add an entry against an ACI where the userdn not equals a dn
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Directory Manager searches added entry in the targeted branch.
#@TestStep Client adds an entry in the targeted branch with a prohibited userdn.
#@TestStep Client adds an entry that is not in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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 for all other steps.
-->
<function name="aci_add_entry_004" scope="local">
<testcase name="getTestCaseName('Add Entry - userdn not equals a dn')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_allow-add_aci3.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - userdn not equals a dn, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - userdn not equals a dn, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_allow-add_entry3.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - userdn not equals a dn, Directory Manager searching added entry'
</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=aci branch,o=Add Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' }
</call>
<message>
'ACI: Add: Add Entry - userdn not equals a dn, user adding entry in targeted branch with a prohibited userdn'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=buser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - userdn not equals a dn, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_allow-add_entry3a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - userdn not equals a dn, 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - userdn not equals a dn, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - add not allowed
#@TestIssue none
#@TestPurpose Add an entry where the ACI does not allow an add
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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_add_entry_005" scope="local">
<testcase name="getTestCaseName('Add Entry - add not allowed')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_allow-delete_aci1.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - add not allowed, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - add not allowed, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_allow-delete_entry1.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - userdn not equals a dn, 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - userdn not equals a dn, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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>
<!-- general targetfilter tests -->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Add Entry Tests
#@TestName Add Entry - targetfilter with one statement
#@TestIssue none
#@TestPurpose Add an entry against an ACI with one targetfilter.
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Directory Manager searches added entry in the targeted branch.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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 for all other steps.
-->
<function name="aci_add_entry_006" scope="local">
<testcase name="getTestCaseName('Add Entry - targetfilter equals one statement')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_targetfilter_aci1.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - targetfilter equals one statement, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - targetfilter equals one statement, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targetfilter_entry1.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targetfilter equals one statement, Directory Manager searching added entry'
</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=aci branch,o=Add Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' }
</call>
<message>
'ACI: Add: Add Entry - targetfilter equals one statement, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targetfilter_entry1a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - targetfilter equals one statement, 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targetfilter equals one statement, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - targetfilter with non-existent attribute
#@TestIssue none
#@TestPurpose Add an entry against an ACI with a targetfilter with non-existent attribute
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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_add_entry_007" scope="local">
<testcase name="getTestCaseName('Add Entry - targetfilter with non-existent attribute')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_targetfilter_aci2.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - targetfilter with non-existent attribute, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - targetfilter with non-existent attribute, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targetfilter_entry2.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - targetfilter with non-existent attribute, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targetfilter_entry2a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - targetfilter with non-existent attribute, 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targetfilter with non-existent attribute, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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>
<!-- general targetattr tests -->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Add Entry Tests
#@TestName Add Entry - targetattr with one attribute
#@TestIssue none
#@TestPurpose Add an entry against an ACI with a targetattr with one attribute.
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Directory Manager searches added entry in the targeted branch.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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 for all other steps.
-->
<function name="aci_add_entry_008" scope="local">
<testcase name="getTestCaseName('Add Entry - targetattr with one attribute')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_targetattr_aci1.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - targetattr with one attribute, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - targetattr with one attribute, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targetattr_entry1.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targetattr with one attribute, Directory Manager searching added entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=cschmith,ou=People,ou=aci branch,o=Add Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' }
</call>
<message>
'ACI: Add: Add Entry - targetattr with one attribute, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targetattr_entry1a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - targetattr with one attribute, 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targetattr with one attribute, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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>
<!-- general targattrfilter tests -->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Add Entry Tests
#@TestName Add Entry - targattrfilter with add:,del:
#@TestIssue none
#@TestPurpose Add an entry against an ACI with a targattrfilter with add:,del:.
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Directory Manager searches added entry in the targeted branch.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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 for all other steps.
-->
<function name="aci_add_entry_009" scope="local">
<testcase name="getTestCaseName('Add Entry - targattrfilter with add:,del:')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_targattrfilter_aci1.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - targattrfilter with add:,del:, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add:,del:, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targattrfilter_entry1.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add:,del:, Directory Manager searching added entry'
</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=aci branch,o=Add Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add:,del:, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targattrfilter_entry1a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add:,del:, 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add:,del:, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - targattrfilter with add: only
#@TestIssue none
#@TestPurpose Add an entry against an ACI with a targattrfilter with add: only.
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Directory Manager searches added entry in the targeted branch.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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 for all other steps.
-->
<function name="aci_add_entry_010" scope="local">
<testcase name="getTestCaseName('Add Entry - targattrfilter with add: only')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_targattrfilter_aci2.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - targattrfilter with add: only, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add: only, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targattrfilter_entry2.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add: only, Directory Manager searching added entry'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'uid=jcrawler,ou=People,ou=aci branch,o=Add Tests,o=ACI Tests,dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add: only, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targattrfilter_entry2a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add: only, 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add: only, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - targattrfilter with add: statement false
#@TestIssue none
#@TestPurpose Add an entry against an ACI with a targattrfilter with add: statement false.
#@TestPreamble Admin adds an aci to the dn of one existing branch.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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_add_entry_011" scope="local">
<testcase name="getTestCaseName('Add Entry - targattrfilter with add: statement false')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_targattrfilter_aci3.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - targattrfilter with add: statement false, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add: statement false, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targattrfilter_entry3.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add: statement false, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_targattrfilter_entry3a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add: statement false, 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_add_entry/del_aci.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - targattrfilter with add: statement false, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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>
<!-- multiple ACI tests -->
<!---
Place test-specific test information here.
The tag, TestMarker, must be the same as the tag, TestSuiteName.
#@TestMarker ACI Add Entry Tests
#@TestName Add Entry - Multi ACIs 1, overall deny
#@TestIssue none
#@TestPurpose Add an entry against two ACIs with with overall deny
#@TestPreamble Admin adds two acis.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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_add_entry_012" scope="local">
<testcase name="getTestCaseName('Add Entry - Multi ACIs 1, overall deny')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_multi_acis1.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - Multi ACIs 1, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 1, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry1.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 1, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry1a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 1, 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_add_entry/del_multi_acis.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 1, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - Multi ACIs 2, overall allow
#@TestIssue none
#@TestPurpose Add an entry against two ACIs with an overall allow
#@TestPreamble Admin adds two acis.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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_add_entry_013" scope="local">
<testcase name="getTestCaseName('Add Entry - Multi ACIs 2, overall allow')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_multi_acis2.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - Multi ACIs 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 2, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry2.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 2, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry2a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 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_add_entry/del_multi_acis.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 2, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - Multi ACIs 3, mixed allow and deny
#@TestIssue none
#@TestPurpose Add an entry against multiple ACIs where the allow or deny depends on specific userds
#@TestPreamble Admin adds two acis.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Client adds an entry in the targeted branch by a prohibited user.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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_add_entry_014" scope="local">
<testcase name="getTestCaseName('Add Entry - Multi ACIs 3, mixed allow and deny')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_multi_acis3.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - Multi ACIs 3, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 3, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry3.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 3, user adding entry in targeted branch by a prohibited user'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=buser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 3, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry3a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 3, 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_add_entry/del_multi_acis.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 3, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - Multi ACIs 4, overall allow with many ACIs
#@TestIssue none
#@TestPurpose Add an entry against many ACIs with an overall allow
#@TestPreamble Admin adds many acis.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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_add_entry_015" scope="local">
<testcase name="getTestCaseName('Add Entry - Multi ACIs 4, overall allow with many ACIs')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_multi_acis4.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - Multi ACIs 4, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 4, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry4.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 4, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry4a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 4, 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_add_entry/del_multi_acis2.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 4, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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 Add Entry Tests
#@TestName Add Entry - Multi ACIs 5, mixed allow and deny with many ACIs
#@TestIssue none
#@TestPurpose Add an entry against many ACIs where the allow or deny depends on specific userds
#@TestPreamble Admin adds many acis.
#@TestStep Client adds an entry in the targeted branch.
#@TestStep Client adds an entry in the targeted branch by a prohibited user.
#@TestStep Client adds an entry in the non-targeted branch.
#@TestStep Remove aci.
#@TestStep Client adds 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_add_entry_016" scope="local">
<testcase name="getTestCaseName('Add Entry - Multi ACIs 5, mixed allow and deny with many ACIs')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
curr_aci_ldif_file = 'add_multi_acis5.ldif'
curr_aci=retrieve_aci('%s/aci/aci_add_entry/%s' % (local.data,curr_aci_ldif_file));
</script>
<message>
'ACI: Add: Add Entry - Multi ACIs 5, 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_add_entry/%s' % (remote.data,curr_aci_ldif_file) }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 5, user adding entry in targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry5.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 5, user adding entry in targeted branch by a prohibited user'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=buser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_common_prohibited_entry.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 5, user adding entry in non-targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_multi_aci_entry5a.ldif' % remote.data ,
'expectedRC' : 50
}
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 5, 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_add_entry/del_multi_acis.ldif' % remote.data }
</call>
<message>
'ACI: Add: Add Entry - Multi ACIs 5, user adding entry in previously targeted branch'
</message>
<call function="'addEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
'dsInstancePswd' : 'ACIRules' ,
'entryToBeAdded' : '%s/aci/aci_add_entry/add_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>
</stax>