<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
! or http://forgerock.org/license/CDDLv1.0.html.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at legal-notices/CDDLv1_0.txt.
! If applicable, add the following below this CDDL HEADER, with the
! fields enclosed by brackets "[]" replaced with your own identifying
! information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
! Copyright 2010 Sun Microsystems, Inc.
! Portions Copyright 2013 ForgeRock AS
! -->
<stax>
<!-- Definition of Test Cases -->
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_001 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_001
#@TestPurpose Create and add a collective attribute
#@TestPreamble
#@TestSteps add collective attribute with attributename;collective
#@TestSteps (with secretary) verify in 2 entries that
#@TestSteps attribute has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_001" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_001: Create and add a Collective Attribute')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif1='%s/core/ldifs/collectiveattr-1.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=kwinters,ou=North,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
</script>
<message>'++ Add collective attribute secretary, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif1
}
</call>
<message>'++ Search attribute secretary in user kwinters'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'secretary'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'secretary: uid=tmorris,ou=Asia,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user kwinters'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective Secretary,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute secretary in user abergin'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'secretary'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'secretary: uid=tmorris,ou=Asia,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_002 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_002
#@TestPurpose Modify the value of the collective attribute
#@TestPreamble
#@TestSteps Modify the value of the collective attribute secretary
#@TestSteps Verify in 2 entries the attribute value has changed.
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_002" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_002: Modify the value of the Collective Attribute')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif2='%s/core/ldifs/collectiveattr-2.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=kwinters,ou=North,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
</script>
<message>'++ Modify collective attribute secretary, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif2
}
</call>
<message>'++ Search attribute secretary in user kwinters'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'secretary'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'secretary: uid=dmiller,ou=America,',
'returnString' : returnString ,
'expectedRC' : 0 ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user kwinters'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective Secretary,',
'returnString' : returnString ,
'expectedRC' : 0 ,
}
</call>
<message>'++ Search attribute secretary in user abergin'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'secretary'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'secretary: uid=dmiller,ou=America,',
'returnString' : returnString ,
'expectedRC' : 0 ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_003 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_003
#@TestPurpose Delete the collective attribute
#@TestPreamble
#@TestSteps Delete the collective attribute secretary
#@TestSteps Verify in one entry the attribute has been removed.
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_003" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_003: Delete the Collective Attribute')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=kwinters,ou=North,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
</script>
<message>'++ Delete collective attribute secretary, should pass'</message>
<call function="'ldapDeleteWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsDeleteSubtree' : 'TRUE' ,
'dsDn' : ['cn=Collective Secretary,dc=example,dc=com']
}
</call>
<message>'++ Search attribute secretary in user kwinters, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'secretary'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'secretary: ',
'returnString' : returnString ,
'expectedRC' : 1
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user kwinters, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective Secretary,',
'returnString' : returnString ,
'expectedRC' : 1
}
</call>
<message>'++ Search attribute secretary in user abergin, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'secretary'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'secretary:',
'returnString' : returnString ,
'expectedRC' : 1
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_004 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_004
#@TestPurpose add an attribute of collective type
#@TestPreamble
#@TestSteps add attribute of collective type c-PostalAddress
#@TestSteps verify in 2 entries that attribute has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_004" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_004: Add an attribute of collective type')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif4='%s/core/ldifs/collectiveattr-4.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=jwallace,ou=South,ou=America,%s' % baseDN
targetDN2='uid=scarter,ou=Asia,%s' % baseDN
</script>
<message>'++ Add an attribute of collective type c-PostalAddress, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif4
}
</call>
<message>'++ Search attribute c-PostalAddress in user jwallace'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PostalAddress: Example Com\$01251 Chestnut Street.*',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user jwallace '</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-PostalAddress,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-PostalAddress in user scarter'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'c-PostalAddress=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PostalAddress: Example Com\$01251 Chestnut Street.*',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_005 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_005
#@TestPurpose modify the value of an attribute of collective type
#@TestPreamble
#@TestSteps modify the value of the attribute c-PostalAddress
#@TestSteps verify in 2 entries that attribute has been modified
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_005" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_005: Modify an attribute of collective type')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif5='%s/core/ldifs/collectiveattr-5.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=gfarmer,ou=America,%s' % baseDN
targetDN2='uid=tmorris,ou=Asia,%s' % baseDN
</script>
<message>'++ Modify the value of the attribute c-PostalAddress, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif5
}
</call>
<message>'++ Search attribute c-PostalAddress in user gfarmer'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PostalAddress: Collective Attr\$76600 Williams Street.*',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user tmorris '</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-PostalAddress,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-PostalAddress in user tmorris'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PostalAddress: Collective Attr\$76600 Williams Street.*',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_006 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_006
#@TestPurpose Delete an attribute of collective type
#@TestPreamble
#@TestSteps delete the attribute c-PostalAddress
#@TestSteps verify in 2 entries that attribute has been removed
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_006" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_006: delete an attribute of collective type')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=kvaughan,ou=Europe,%s' % baseDN
targetDN2='uid=dmiller,ou=America,%s' % baseDN
</script>
<message>'++ Delete the attribute c-PostalAddress, should pass'</message>
<call function="'ldapDeleteWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsDeleteSubtree' : 'TRUE' ,
'dsDn' : ['cn=Collective c-PostalAddress,dc=example,dc=com']
}
</call>
<message>'++ Search attribute c-PostalAddress in user kvaughan, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'secretary=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'secretary: ',
'returnString' : returnString ,
'expectedRC' : 1
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user kvaughan, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective PostalAddress,',
'returnString' : returnString ,
'expectedRC' : 1
}
</call>
<message>'++ Search attribute c-PostalAddress in user dmiller, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'c-PostalAddress=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PostalAddress:',
'returnString' : returnString ,
'expectedRC' : 1
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_007 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_007
#@TestPurpose add a collective attribute and an attribute of collective type
#@TestPreamble
#@TestSteps add 2 collective attributes with the 2 syntaxes
#@TestSteps verify in 2 entries that 2 attributes have been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_007" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_007: Add 2 collective attributes with the 2 syntaxes')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif7='%s/core/ldifs/collectiveattr-7.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=scarter,ou=Asia,%s' % baseDN
</script>
<message>'++ Add 2 collective attributes secretary and c-TelexNumber, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif7
}
</call>
<message>'++ Search 2 attributes in user trigden'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-TelexNumber: 959\$105\$TYR',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'secretary: uid=tmorris,ou=Asia,ou=People',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user trigden '</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-TelexNumber',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective Secretary',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search the 2 attribute in user scarter'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'c-TelexNumber secretary'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'secretary: uid=tmorris,ou=Asia,ou=People',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'c-TelexNumber: 959\$105\$TYR',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_008 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_008
#@TestPurpose Add a collective attribute to test minimumDepth syntax 1
#@TestPreamble
#@TestSteps add collective attribute to test minimumDepth
#@TestSteps (with businesscategory) verify in 1 entry under ou=North
#@TestSteps that attribute has been added, in 1 entry under ou=South
#@TestSteps and in 1 entry outside ou=North that attribute has not
#@TestSteps been added.
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_008" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_008: Add a collective attribute to test minimumDepth syntax 1')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif8='%s/core/ldifs/collectiveattr-8.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=cschmith,ou=South,ou=America,%s' % baseDN
targetDN3='uid=abergin,ou=Europe,%s' % baseDN
</script>
<message>'++ Add collective attribute businesscategory, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif8
}
</call>
<message>'++ Search attribute businesscategory in user trigden'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'businesscategory=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'businessCategory: Finance Group',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user trigden'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective businessCategory,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute businesscategory in user cschmith'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'businesscategory=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'businessCategory: Finance Group',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute businesscategory in user abergin should FAIL'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'businesscategory=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'businessCategory: Finance Group',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_009 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_009
#@TestPurpose Add a collective attribute to test minimumDepth syntax 2
#@TestPreamble
#@TestSteps add collective attribute to test minimumDepth
#@TestSteps (with c-ou) verify in 1 entry under ou=North
#@TestSteps that attribute has been added, in 1 entry under ou=South
#@TestSteps and in 1 entry outside ou=North that attribute has not
#@TestSteps been added.
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_009" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_009: Add a collective attribute to test minimumDepth syntax2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif9='%s/core/ldifs/collectiveattr-9.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=kwinters,ou=North,ou=America,%s' % baseDN
targetDN2='uid=jwallace,ou=South,ou=America,%s' % baseDN
targetDN3='uid=scarter,ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute c-ou should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif9
}
</call>
<message>'++ Search attribute c-ou in user kwinters'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'c-ou=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-ou: corporate',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user kwinters'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-ou,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-ou in user jwallace'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'c-ou=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-ou: corporate',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-ou in user scarter should FAIL'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'c-ou=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-ou: corporate',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_010 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_010
#@TestPurpose Remove one subtree to test minimumDepth
#@TestPreamble
#@TestSteps remove one subtree ou=South to test minimumDepth
#@TestSteps (with businesscategory) verify in 1 entry under ou=North
#@TestSteps that attribute is still there , in 1 entry
#@TestSteps under ou=South the entry isn't there anymore, and in
#@TestSteps 1 entry outside ou=America it's not been added.
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_010" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_010: Remove one subtree to test minimumDepth')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=kwinters,ou=North,ou=America,%s' % baseDN
targetDN2='uid=jwallace,ou=South,ou=America,%s' % baseDN
targetDN3='uid=scarter,ou=Asia,%s' % baseDN
</script>
<message>'++ Delete the subtree ou=South,ou=America'</message>
<call function="'ldapDeleteWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsDeleteSubtree' : 'TRUE' ,
'dsDn' : ['ou=South,ou=America,%s' % baseDN]
}
</call>
<message>'++ Search attributes c-ou and businessCategory in user kwinters, should Pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-ou: corporate',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'businessCategory: Finance Group',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attributes collectiveAttributeSubentries in user kwinters'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-ou',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective businessCategory',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-ou in user jwallace, should Fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'c-ou=*' ,
'expectedRC' : 32
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<message>'++ Search attribute businessCategory=* in user jwallace, should Fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'businessCategory=*' ,
'expectedRC' : 32
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<message>'++ Search attributes c-ou and businessCategory in user scarter should FAIL'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-ou: corporate',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'businessCategory: Finance Group',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_011 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_011
#@TestPurpose Add a collective attribute to test minimumDepth maximumDepth syntax1
#@TestPreamble
#@TestSteps add collective attribute to test minimumDepth
#@TestSteps maximumDepth syntax1 (with departmentNumber) verify
#@TestSteps under ou=North that attribute has not been added, and
#@TestSteps in under ou=Europe that attribute has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_011" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_011: Add a collective attribute to test minimumDepth maximumDepth syntax1')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif11='%s/core/ldifs/collectiveattr-11.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
</script>
<message>'++ Add collective attribute departmentNumber should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif11
}
</call>
<message>'++ Search attribute departmentNumber in user trigden, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'departmentNumber=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'departmentNumber: 445566',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user abergin'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective departmentNumber,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute departmentNumber in user abergin'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'departmentNumber=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'departmentNumber: 445566',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_012 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_012
#@TestPurpose Add a collective attribute to test minimumDepth maximumDepth syntax2
#@TestPreamble
#@TestSteps add collective attribute to test minimumDepth
#@TestSteps maximumDepth syntax2 (with c-PostOfficeBox) verify
#@TestSteps under ou=North that attribute has not been added, and
#@TestSteps in under ou=Asia that attribute has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_012" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_012: Add a collective attribute to test minimumDepth maximumDepth syntax2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif12='%s/core/ldifs/collectiveattr-12.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=kwinters,ou=North,ou=America,%s' % baseDN
targetDN2='uid=tmorris,ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute c-PostOfficeBox should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif12
}
</call>
<message>'++ Search attribute c-PostOfficeBox in user kwinters, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'c-PostOfficeBox=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PostOfficeBox: PO BOX 2869',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user tmorris'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-PostOfficeBox,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-PostOfficeBox in user tmorris'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'c-PostOfficeBox=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PostOfficeBox: PO BOX 2869',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_014 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_014
#@TestPurpose Create a custom attribute then make it collective
#@TestPreamble
#@TestSteps add a custom attribute commonSecretary the create a
#@TestSteps collective attribute with that new attribute. verify in
#@TestSteps 1 entry that attribute has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_014" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_014: Create a custom Attribute then make it collective')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif14a='%s/core/ldifs/collectiveattr-14a.ldif' % remote.data
coreattrLdif14b='%s/core/ldifs/collectiveattr-14b.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=dmiller,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
</script>
<message>'++ Add custom attribute commonSecretary, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif14a
}
</call>
<message>'++ Add collective attribute for commonSecretary, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif14b
}
</call>
<message>'++ Search attribute commonSecretary in user dmiller'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'commonSecretary'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'commonSecretary: uid=gfarmer,ou=America,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user dmiller'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective commonSecretary,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute commonSecretary in user abergin'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'commonSecretary'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'commonSecretary: uid=gfarmer,ou=America',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_015 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_015
#@TestPurpose add PostallAddress collective attribute and
#@TestPurpose c-PostalAddress attribute of collective type
#@TestPreamble
#@TestSteps add 2 collective attributes with the 2 syntaxes
#@TestSteps PostalAddress and c-PostalAddress
#@TestSteps verify in 2 entries that 2 attributes have been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_015" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_015: Add PostalAddress and c-PostalAddress collective attributes with the 2 syntaxes')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif15='%s/core/ldifs/collectiveattr-15.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=scarter,ou=Asia,%s' % baseDN
</script>
<message>'++ Add 2 collective attributes PostalAddress and c-PostalAddress, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif15
}
</call>
<message>'++ Search 2 attributes in user trigden'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'postalAddress: Example Com\$ 40388 Sixth Street.*',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'c-PostalAddress: Example Com\$30754 College Street.*',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user trigden '</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective PostalAddress',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-PostalAddress',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search the 2 attributes in user scarter'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'PostalAddress c-PostalAddress'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'PostalAddress: Example Com\$ 40388 Sixth Street.*',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'c-PostalAddress: Example Com\$30754 College Street.*',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_016 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_016
#@TestPurpose Add a collective attribute to test real-overides-virtual
#@TestPreamble
#@TestSteps add collective attribute to test real-overides-virtual
#@TestSteps syntax1 (with facsimileTelephoneNumber) verify
#@TestSteps under ou=Europe that attribute has been added, and
#@TestSteps outside ou=Europe that attribute has not been modified
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_016" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_016: Add a collective attribute to test real-overides-virtual syntax1')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif16a='%s/core/ldifs/collectiveattr-16a.ldif' % remote.data
coreattrLdif16b='%s/core/ldifs/collectiveattr-16b.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=kvaughan,ou=Europe,%s' % baseDN
targetDN3='uid=rdaugherty,ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute facsimileTelephoneNumber should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif16a
}
</call>
<message>'++ Search attribute facsimileTelephoneNumber in user trigden, should pass with real value'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'facsimileTelephoneNumber=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'facsimileTelephoneNumber: \+1 408 555 8473',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user kvaughan'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective facsimileTelephoneNumber,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute facsimileTelephoneNumber in user kvaughan'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'facsimileTelephoneNumber=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'facsimileTelephoneNumber: \+1 408 555 8477',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Add new user rdaugherty with a set facsimileTelephoneNumber should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif16b
}
</call>
<message>'++ Search attribute facsimileTelephoneNumber in user rdaugherty'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'facsimileTelephoneNumber=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'facsimileTelephoneNumber: \+1 408 555 1992',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_017 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_017
#@TestPurpose Add a collective attribute to test real-overides-virtual
#@TestPreamble
#@TestSteps add collective attribute to test real-overides-virtual
#@TestSteps syntax2 (with c-PhysicalDeliveryOfficeName) verify in
#@TestSteps 2 entries that the virtual value has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_017" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_017: Add a collective attribute to test real-overides-virtual syntax2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif17='%s/core/ldifs/collectiveattr-17.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=tmorris,ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute c-PhysicalDeliveryOfficeName should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif17
}
</call>
<message>'++ Search attribute c-PhysicalDeliveryOfficeName in user trigden, should pass with virtual value'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'c-PhysicalDeliveryOfficeName=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PhysicalDeliveryOfficeName: par07',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user tmorris'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-PhysicalDeliveryOfficeName,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-PhysicalDeliveryOfficeName in user tmorris, should pass with virtual value'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'c-PhysicalDeliveryOfficeName=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PhysicalDeliveryOfficeName: par07',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_018 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_018
#@TestPurpose Add a collective attribute to test virtual-overides-real
#@TestPreamble
#@TestSteps add collective attribute to test virtual-overides-real
#@TestSteps syntax1 (with employeeType) verify when in an entry
#@TestSteps that the virtual value has overridden the real one, in
#@TestSteps another one that attribute has been added, then add a
#@TestSteps user that has a set value for employeeType and verify
#@TestSteps by adding the user that employeeType will change.
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_018" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_018: Add a collective attribute to test virtual-overides-real syntax1')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif18a='%s/core/ldifs/collectiveattr-18a.ldif' % remote.data
coreattrLdif18b='%s/core/ldifs/collectiveattr-18b.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=dmiller,ou=America,%s' % baseDN
targetDN2='uid=tmorris,ou=Asia,%s' % baseDN
targetDN3='uid=jreuter,ou=Europe,%s' % baseDN
</script>
<message>'++ Add collective attribute employeeType should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif18a
}
</call>
<message>'++ Search attribute employeeType in user dmiller, should pass with virtual value'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'employeeType=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'employeeType: LTR-3',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user tmorris'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective employeeType,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute employeeType in user tmorris, should pass with virtual value'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'employeeType: LTR-3',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Add new user jreuter with a set employeeType should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif18b
}
</call>
<message>'++ Search attribute employeeType in user jreuter, should pass with virtual value '</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'employeeType: LTR-3',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_019 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_019
#@TestPurpose Add a collective attribute to test virtual-overides-real
#@TestPreamble
#@TestSteps add collective attribute and set virtual-overides-real
#@TestSteps syntax2 (with c-PostalCode) verify in 2 entries
#@TestSteps that the virtual value has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_019" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_019: Add a collective attribute to test virtual-overides-real syntax2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif19='%s/core/ldifs/collectiveattr-19.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=kwinters,ou=North,ou=America,%s' % baseDN
targetDN2='uid=scarter,ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute c-PostalCode should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif19
}
</call>
<message>'++ Search attribute c-PostalCode in user kwinters, should pass with virtual value'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'c-PostalCode=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PostalCode: 76800',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user scarter'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-PostalCode,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-PostalCode in user scarter, should pass with virtual value'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'c-PostalCode=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-PostalCode: 76800',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_020 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_020
#@TestPurpose Add a collective attribute to test merge-real-and-virtual
#@TestPreamble
#@TestSteps add collective attribute to test merge-real-and-virtual
#@TestSteps syntax1 (with preferredLanguage) verify in 1 entry
#@TestSteps the attribute value is the virtual and the real one, in
#@TestSteps another one that attribute has been added, then add a
#@TestSteps user that has a set value for preferredServerList and
#@TestSteps verify by adding the user that preferredServerList will
#@TestSteps have both values
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_020" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_020: Add a collective attribute to test merge-real-and-virtual syntax1')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif20a='%s/core/ldifs/collectiveattr-20a.ldif' % remote.data
coreattrLdif20b='%s/core/ldifs/collectiveattr-20b.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=dmiller,ou=America,%s' % baseDN
targetDN2='uid=tmorris,ou=Asia,%s' % baseDN
targetDN3='uid=tmason,ou=America,%s' % baseDN
</script>
<message>'++ Add collective attribute preferredLanguage should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif20a
}
</call>
<message>'++ Search attribute preferredLanguage in user dmiller, should pass with both values'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'preferredLanguage=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'preferredLanguage: fr',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'preferredLanguage: zh_CN',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user tmorris'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective preferredLanguage,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute preferredLanguage in user tmorris, should pass with virtual value'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'preferredLanguage: zh_CN',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Add new user tmason with a set preferredLanguage should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif20b
}
</call>
<message>'++ Search attribute preferredLanguage in user tmason should pass with both values '</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'preferredLanguage: ja_JP',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'preferredLanguage: zh_CN',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_021 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_021
#@TestPurpose Add a collective attribute to test merge-real-and-virtual
#@TestPreamble
#@TestSteps add collective attribute to test merge-real-and-virtual
#@TestSteps syntax2 (with c-l) verify in 1 entry the attribute value
#@TestSteps is the virtual one, add a user, verify the attribute
#@TestSteps c-l has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_021" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_021: Add a collective attribute to test merge-real-and-virtual syntax2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif21a='%s/core/ldifs/collectiveattr-21a.ldif' % remote.data
coreattrLdif21b='%s/core/ldifs/collectiveattr-21b.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=gfarmer,ou=America,%s' % baseDN
targetDN3='uid=bhall,ou=North,ou=America,%s' % baseDN
</script>
<message>'++ Add collective attribute c-l should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif21a
}
</call>
<message>'++ Search attribute c-l and l in user gfarmer, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'c-l=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-l: Santa Clara',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'l: Cupertino',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user gfarmer'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-l,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Add new user bhall, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif21b
}
</call>
<message>'++ Search attribute c-l and l in user bhall should pass '</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-l: Santa Clara',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'l: Sunnyvale',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_022 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_022
#@TestPurpose collective attribute test excludeAllCollectiveAttributes
#@TestPreamble
#@TestSteps add a user with collectiveExclusions set to
#@TestSteps excludeAllCollectiveAttributes. add one coll attribute
#@TestSteps with syntax 1, then one with syntax 2, verify the 2
#@TestSteps attributes have not been added in the new user, and has
#@TestSteps has been added in the others users
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_022" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_022: collective attribute test excludeAllCollectiveAttributes syntax 1 and 2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif22a='%s/core/ldifs/collectiveattr-22a.ldif' % remote.data
coreattrLdif22b='%s/core/ldifs/collectiveattr-22b.ldif' % remote.data
coreattrLdif22c='%s/core/ldifs/collectiveattr-22c.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=kvaughan,ou=Europe,%s' % baseDN
targetDN2='uid=bhall,ou=North,ou=America,%s' % baseDN
targetDN3='uid=mward,ou=America,%s' % baseDN
</script>
<message>'++ Add new user mward, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif22a
}
</call>
<message>'++ Search attribute c-l and l in user mward should fail '</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-l: Santa Clara',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'l: Sunnyvale',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Add collective attribute seeAlso should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif22b
}
</call>
<message>'++ Add collective attribute c-st should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif22c
}
</call>
<message>'++ Search attribute seeAlso and c-st in user kvaughan, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'seeAlso: uid=scarter\,ou=Asia',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'c-st: Jefferson Street',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute seeAlso and c-st in user bhall, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'seeAlso: uid=scarter\,ou=Asia',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'c-st: Jefferson Street',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user bhall, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-st,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute seeAlso and c-st in user mward, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'seeAlso: uid=scarter\,ou=Asia',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'c-st: Jefferson Street',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_023 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_023
#@TestPurpose collective attribute test collectiveExclusions=list collective attributes
#@TestPreamble
#@TestSteps add a user with collectiveExclusions set to
#@TestSteps a list of collective attr, add one coll attribute
#@TestSteps with syntax 1, then one with syntax 2, verify the 2
#@TestSteps attributes have not been added in the new user, and has
#@TestSteps has been added in the others users
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_023" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_023: collective attribute test collectiveExclusions=list syntax 1 and 2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif23a='%s/core/ldifs/collectiveattr-23a.ldif' % remote.data
coreattrLdif23b='%s/core/ldifs/collectiveattr-23b.ldif' % remote.data
coreattrLdif23c='%s/core/ldifs/collectiveattr-23c.ldif' % remote.data
coreattrLdif23d='%s/core/ldifs/collectiveattr-23d.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=scarter,ou=Asia,%s' % baseDN
targetDN2='uid=bhall,ou=North,ou=America,%s' % baseDN
targetDN3='uid=alutz,ou=Asia,%s' % baseDN
</script>
<message>'++ Add new user alutz, should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif23a
}
</call>
<message>'++ Search attribute c-l and preferredLanguage in user alutz should fail '</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-l: Santa Clara',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'preferredLanguage: zh_CN',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Add collective attribute photo should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif23b
}
</call>
<message>'++ Add collective attribute c-o should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif23c
}
</call>
<message>'++ Add collective attribute displayName should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif23d
}
</call>
<message>'++ Search attribute photo and c-o in user scarter, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'photo: SunOraclesmall.gif',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'c-o: Development',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute photo and c-o in user bhall, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'photo: SunOraclesmall.gif',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'c-o: Development',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user bhall, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective photo,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-o,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective displayName,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute photo and c-o in user alutz, should fail, search displayName should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'photo: SunOraclesmall.gif',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'c-o: Development',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<call function="'searchString'">
{ 'expectedString' : 'displayName: Sollicitors',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_024 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_024
#@TestPurpose Add a collective attribute to test chopAfter chopBefore syntax1
#@TestPreamble
#@TestSteps add collective attribute to test chopAfter:ou=America
#@TestSteps chopBefore:ou=Europe syntax1 (with buildingName) verify
#@TestSteps below ou=Europe and ou=North,ou=America that attribute
#@TestSteps has not been added, then at ou=America level and under
#@TestSteps ou=Asia that attribute has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_024" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_024: Add a collective attribute to test chopAfter chopBefore syntax1')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif24='%s/core/ldifs/collectiveattr-24.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
targetDN3='ou=America,%s' % baseDN
targetDN4='uid=scarter,ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute buildingName should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif24
}
</call>
<message>'++ Search attribute buildingName in user trigden, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'buildingName: Capital 4',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute buildingName in user abergin, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'buildingName=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'buildingName: Capital 4',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in ou=America'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective buildingName,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute buildingName in ou=America, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'buildingName=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'buildingName: Capital 4',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute buildingName in user scarter, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN4 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'buildingName: Capital 4',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_025 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_025
#@TestPurpose Add a collective attribute to test chopAfter chopBefore syntax2
#@TestPreamble
#@TestSteps add collective attribute to test chopAfter:ou=Asia
#@TestSteps chopBefore:ou=America syntax2 (with c-TelephoneNumber)
#@TestSteps verify below ou=Asia and ou=North,ou=America that
#@TestSteps attribute has not been added, then at ou=Asia level and
#@TestSteps under ou=Europe that attribute has been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_025" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_025: Add a collective attribute to test chopAfter chopBefore syntax2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif25='%s/core/ldifs/collectiveattr-25.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=scarter,ou=Asia,%s' % baseDN
targetDN3='ou=Asia,%s' % baseDN
targetDN4='uid=abergin,ou=Europe,%s' % baseDN
</script>
<message>'++ Add collective attribute c-TelephoneNumber should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif25
}
</call>
<message>'++ Search attribute c-TelephoneNumber in user trigden, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-TelephoneNumber: \+1 408 555 5555',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute buildingName in user scarter, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'c-TelephoneNumber=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-TelephoneNumber: \+1 408 555 5555',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in ou=Asia'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-TelephoneNumber,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-TelephoneNumber in ou=Asia, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'c-TelephoneNumber=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-TelephoneNumber: \+1 408 555 5555',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-TelephoneNumber in user abergin, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN4 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-TelephoneNumber: \+1 408 555 5555',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_026 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_026
#@TestPurpose Add a collective attribute to test Filter syntax1
#@TestPreamble
#@TestSteps add collective attribute to test Filter syntax1
#@TestSteps (with description) verify in a top and not person
#@TestSteps that attribute has been added (in an organization), and
#@TestSteps in a person that attribute has not been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_026" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_026: Add a collective attribute to test Filter syntax1')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif26='%s/core/ldifs/collectiveattr-26.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
targetDN3='ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute description should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif26
}
</call>
<message>'++ Search attribute description in user trigden, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'description=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'description: Worldwide employees',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute description in user abergin, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'description=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'description: Worldwide employees',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in ou=Asia'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective description,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute description in ou=Asia, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'description=Worldwide*' ,
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'dn: ou\=Asia,ou\=People,',
'returnString' : returnString ,
'expectedRC' : 0 ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_027 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_027
#@TestPurpose Add a collective attribute to test Filter syntax2
#@TestPreamble
#@TestSteps add collective attribute to test Filter
#@TestSteps syntax2 (with c-street) verify in a person that
#@TestSteps attribute c-street has been added, and in a not person
#@TestSteps (so an organization) that attribute has not been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_027" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_027: Add a collective attribute to test Filter syntax2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif27='%s/core/ldifs/collectiveattr-27.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
targetDN3='ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute description should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif27
}
</call>
<message>'++ Search attribute c-street in user trigden, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'c-street=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-street: Chestnut Street',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute collectiveAttributeSubentries in user abergin'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*' ,
'dsAttributes' : 'collectiveAttributeSubentries'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'collectiveAttributeSubentries: cn=Collective c-street,',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-street in user abergin, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'c-street=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-street: Chestnut Street',
'returnString' : returnString ,
'expectedRC' : expectedRC ,
}
</call>
<message>'++ Search attribute c-street in ou=Asia, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'c-street=Chestnut*' ,
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'dn: ou\=Asia,ou\=People,',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_028 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_028
#@TestPurpose Add a collective attribute to test incorrect subtreeSpecification syntax1
#@TestPreamble
#@TestSteps add collective attribute to test incorrect
#@TestSteps subtreeSpecification syntax1 (with pwdMinLength) verify
#@TestSteps in 3 entries that attribute has not been added.
#@TestSteps verify the collective attributes exists under baseDN
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_028" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_028: Add a collective attribute to test incorrect subtreeSpecification syntax1')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif28='%s/core/ldifs/collectiveattr-28.ldif' % remote.data
baseDN1='dc=example,dc=com'
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
targetDN3='ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute pwdMinLength should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif28
}
</call>
<message>'++ Search attribute pwdMinLength in user trigden, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'pwdMinLength=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'pwdMinLength: 9',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute pwdMinLength in user abergin, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'pwdMinLength=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'pwdMinLength: 9',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute pwdMinLength in ou=Asia, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'objectclass=*' ,
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'pwdMinLength: 9',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case : Core : Collective Attributes : core_collectiveattr_029 -->
<!--- Test Case information
#@TestMarker Schema
#@TestName Core : Collective Attributes
#@TestID core_collectiveattr_029
#@TestPurpose Add a collective attribute to test incorrect subtreeSpecification syntax2
#@TestPreamble
#@TestSteps add collective attribute to test incorrect
#@TestSteps subtreeSpecification syntax2 (with
#@TestSteps c-FacsimileTelephoneNumber) verify in 3 entries that
#@TestSteps attribute has not been added
#@TestPostamble
#@TestResult Test is successful if the result code is 0
-->
<function name="core_collectiveattr_029" scope="local">
<testcase name="getTestCaseName('core_collectiveattr_029: Add a collective attribute to test incorrect subtreeSpecification syntax2')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<script>
coreattrLdif29='%s/core/ldifs/collectiveattr-29.ldif' % remote.data
baseDN='ou=People,o=collectiveattr tests,dc=example,dc=com'
targetDN1='uid=trigden,ou=North,ou=America,%s' % baseDN
targetDN2='uid=abergin,ou=Europe,%s' % baseDN
targetDN3='ou=Asia,%s' % baseDN
</script>
<message>'++ Add collective attribute should pass'</message>
<call function="'ldapModifyWithScript'">
{
'dsAdd' : 'True' ,
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsFilename' : coreattrLdif29
}
</call>
<message>'++ Search attribute c-FacsimileTelephoneNumber in user trigden, should pass'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN1 ,
'dsFilter' : 'c-FacsimileTelephoneNumber=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-FacsimileTelephoneNumber: + 1 408 777 4444',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute c-FacsimileTelephoneNumber in user abergin, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN2 ,
'dsFilter' : 'objectclass=*'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-FacsimileTelephoneNumber: + 1 408 777 4444',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
<message>'++ Search attribute c-FacsimileTelephoneNumber in ou=Asia, should fail'</message>
<call function="'ldapSearchWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : targetDN3 ,
'dsFilter' : 'c-FacsimileTelephoneNumber=*' ,
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'searchString'">
{ 'expectedString' : 'c-FacsimileTelephoneNumber: + 1 408 777 4444',
'returnString' : returnString ,
'expectedRC' : 1 ,
}
</call>
</sequence>
<catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<call function="'testCase_Postamble'"/>
</finally>
</try>
</sequence>
</testcase>
</function>
</stax>