export_tests.xml revision da97433d5cd26e422a370d186f98659383c06721
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
! Copyright 2009 Sun Microsystems, Inc.
! -->
<stax>
<!--- Test Case information
#@TestMarker Backend Import Tests
#@TestName Backend: Import: Create Second Instance
#@TestID Create second instance
#@TestPurpose Create second instance of OpenDS to verify export
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="backends_export_001" scope="local">
<testcase name="getTestCaseName('Create Second Instance')">
<try>
<sequence>
<call function="'testCase_Preamble'" />
<!-- Create a second instance to import data that was exported from the first instance -->
<message>
'Creating another instance for verifing the exports'
</message>
<call function="'createInstance'">
{ 'dsHost' : '%s' % DIRECTORY_INSTANCE_HOST,
'dsDir' : DsInstanceDir,
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : '%s' % DIRECTORY_INSTANCE_DN,
'dsBindPwd' : '%s' % DIRECTORY_INSTANCE_PSWD,
'dsBaseDN' : '%s' % DIRECTORY_INSTANCE_SFX
}
</call>
<!-- Start second server -->
<call function="'StartDsWithScript'">
{'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<!-- Create a second backend -->
<script>
options=[]
options.append('--backend-name "nonDefault"')
options.append('--set base-dn:"dc=non-default,dc=com"')
options.append('--set enabled:true')
options.append('--set writability-mode:enabled')
options.append('-t local-db')
createBackendOptions=' '.join(options)
</script>
<call function="'dsconfig'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir,OPENDSNAME),
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DsInstanceAdminPort,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'subcommand' : 'create-backend',
'optionsString' : createBackendOptions
}
</call>
<!-- Stop second server -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: LDIF Default
#@TestID LDIF Default
#@TestPurpose Verify an export of a LDIF file on the default backend.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_002" scope="local">
<testcase name="getTestCaseName('LDIF Default')">
<try>
<sequence>
<call function="'testCase_Preamble'" />
<message>
'Backend: Export: Export default backend'
</message>
<call function="'exportLdifWithScript'">
{
'ldifFile' : '%s/backends/Export_default.ldif' % remote.data,
'backEnd' : '%s' % DIRECTORY_INSTANCE_BE
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_default.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: LDIF Non Default
#@TestID LDIF Non Default
#@TestPurpose Verify an export of a LDIF file on a differrent backend to the default.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
non-default backend, and ldifFile
#@TestPostamble
#@TestResult Success if Success if exportLdif, importLDIF returns 0
-->
<function name="backends_export_003" scope="local">
<testcase name="getTestCaseName('LDIF Non Default')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export non-default backend'
</message>
<call function="'StartDsWithScript'"/>
<script>
options=[]
options.append('--backend-name "nonDefault"')
options.append('--set base-dn:"dc=non-default,dc=com"')
options.append('--set enabled:true')
options.append('--set writability-mode:enabled')
options.append('-t local-db')
createBackendOptions=' '.join(options)
</script>
<call function="'dsconfig'">
{ 'subcommand' : 'create-backend',
'optionsString' : createBackendOptions
}
</call>
<call function="'importLdifTask'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'taskID' : STAXCurrentTestcase,
'ldifFile' : '%s/backends/nonDefault.ldif' % remote.data,
'backEnd' : 'nonDefault'
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=non-default,dc=com',
'uid=dmiller, ou=People, dc=non-default,dc=com',
'uid=rhunt, ou=People, dc=non-default,dc=com'],
'startDS' : 'no'
}
</call>
<call function="'StopDsWithScript'"/>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_nonDefault.ldif' % remote.data,
'backEnd' : 'nonDefault'
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_nonDefault.ldif' % remote.data,
'dsBackEnd' : 'nonDefault' ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=non-default,dc=com',
'uid=dmiller, ou=People, dc=non-default,dc=com',
'uid=rhunt, ou=People, dc=non-default,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Include Branch
#@TestID Fractional Include Branch
#@TestPurpose Verify an export of a LDIF file specifying a branch that should be included in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and -b option. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_004" scope="local">
<testcase name="getTestCaseName('Fractional Include Branch')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Include Branch'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_IncludeBranch.ldif' % remote.data,
'includeBranches' : ["dc=com"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_IncludeBranch.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Include Branches
#@TestID Fractional Include Branches
#@TestPurpose Verify an export of a LDIF file specifying multiple branches that should be included in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and two -b options. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_005" scope="local">
<testcase name="getTestCaseName('Fractional Include Branches')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Include Branches'
</message>
<call function="'exportLdifWithScript'">
{
'ldifFile' : '%s/backends/Export_IncludeBranches.ldif' % remote.data,
'includeBranches': ["dc=com","dc=example,dc=com"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_IncludeBranches.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Exclude Branch
#@TestID Fractional Exclude Branch
#@TestPurpose Verify an export of a LDIF file specifying a branch that should be excluded in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and -B option. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_006" scope="local">
<testcase name="getTestCaseName('Fractional Exclude Branch')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Exclude Branch'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_ExcludeBranch.ldif' % remote.data,
'excludeBranches' : ["dc=example,dc=com"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_ExcludeBranch.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'missingEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com'],
'expectedEntries' : ['dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Exclude Branches
#@TestID Fractional Exclude Branches
#@TestPurpose Verify an export of a LDIF file specifying multiple branches that should be excluded in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and two -B options. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_007" scope="local">
<testcase name="getTestCaseName('Export Fractional Exclude Branches')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Exclude Branches'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_ExcludeBranches.ldif' % remote.data,
'excludeBranches' : ["ou=People,dc=example,dc=com","dc=example,dc=com"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_ExcludeBranches.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'missingEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com'],
'expectedEntries' : ['dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Branches Mix
#@TestID Fractional Branches Mix
#@TestPurpose Verify an export of a LDIF file specifying a mix of include and exclude branches.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, both -b and -B options. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_008" scope="local">
<testcase name="getTestCaseName('Export Fractional Branches Mix')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Branches Mix'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_MixBranches.ldif' % remote.data,
'includeBranches' : ["dc=com"],
'excludeBranches' : ["ou=People,dc=example,dc=com"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_MixBranches.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'missingEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com'],
'expectedEntries' : ['dc=com','dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Include Attribute
#@TestID Fractional Include Attribute
#@TestPurpose Verify an export of a LDIF file specifying an attribute that should be included in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and -i option. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_009" scope="local">
<testcase name="getTestCaseName('Export Fractional Include Attribute')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Include Attribute'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_IncludeAttr.ldif' % remote.data,
'includeAttributes' : ["dc"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_IncludeAttr.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['dc=com','dc=example,dc=com'],
'missingEntries' : ['ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Include Attributes
#@TestID Fractional Include Attributes
#@TestPurpose Verify an export of a LDIF file specifying multiple attributes that should be included in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and five -i options. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_010" scope="local">
<testcase name="getTestCaseName('Export Fractional Include Attributes')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Include Attributes'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_IncludeAttrs.ldif' % remote.data,
'includeAttributes' : ["dc","cn","ou","sn","uid"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_IncludeAttrs.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'missingAttributes' : ['userpassword'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Exclude Attribute
#@TestID Fractional Exclude Attribute
#@TestPurpose Verify an export of a LDIF file specifying an attribute that should be excluded in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and -e option. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_011" scope="local">
<testcase name="getTestCaseName('Export Fractional Exclude Attribute')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Exclude Attribute'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_ExcludeAttr.ldif' % remote.data,
'excludeAttributes' : ["userPassword"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_ExcludeAttr.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com'],
'missingAttributes' : ['userpassword'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Exclude Attributes
#@TestID Fractional Exclude Attributes
#@TestPurpose Verify an export of a LDIF file specifying multiple attribute that should be excluded in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and three -e options. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_012" scope="local">
<testcase name="getTestCaseName('Export Fractional Exclude Attributes')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Exclude Attributes'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_ExcludeAttrs.ldif' % remote.data,
'excludeAttributes' : ["userPassword","mail","roomnumber"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_ExcludeAttrs.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'missingAttributes' : ['userpassword','mail','roomnumber'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Mix
#@TestID Fractional Mix
#@TestPurpose Verify an export of a LDIF file specifying a mix of fractional attributes and branches.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and mixed -i, -b, and -B options. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_013" scope="local">
<testcase name="getTestCaseName('Export Fractional Mix')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Mix'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_FractionalMix.ldif' % remote.data,
'includeAttributes' : ["dc","cn","ou","sn","uid"],
'includeBranches' : ["dc=com","dc=example,dc=com","ou=People,dc=example,dc=com"],
'excludeBranches' : ["ou=Departed,ou=People,dc=example,dc=com"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FractionalMix.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'missingAttributes' : ['userpassword'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Filtered Include
#@TestID Filtered Include
#@TestPurpose Verify an export of a LDIF file specifying a search filter control which entries are included in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and -I option. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_014" scope="local">
<testcase name="getTestCaseName('Export Filtered Include')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Include'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_FilteredInclude.ldif' % remote.data,
'includeFilters' : ["objectclass=*"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FilteredInclude.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Filtered Includes
#@TestID Filtered Includes
#@TestPurpose Verify an export of a LDIF file specifying a search filter control which entries are included in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and two -I options. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_015" scope="local">
<testcase name="getTestCaseName('Export Filtered Includes')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Includes'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
'includeFilters' : ["objectclass=domain","objectclass=organizationalunit"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['dc=example,dc=com', 'dc=com'],
'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Filtered Exclude
#@TestID Filtered Exclude
#@TestPurpose Verify an export of a LDIF file specifying search filter control which entries are excluded in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, an ldifFile, and -E option. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_016" scope="local">
<testcase name="getTestCaseName('Export Filtered Exclude')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Exclude'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_FilteredExclude.ldif' % remote.data,
'excludeFilters' : ["objectclass=person"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FilteredExclude.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['dc=example,dc=com',
'ou=People,dc=example,dc=com'],
'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Filtered Excludes
#@TestID Filtered Excludes
#@TestPurpose Verify an export of a LDIF file specifying multiple search filters control which entries are excluded in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_017" scope="local">
<testcase name="getTestCaseName('Export Filtered Excludes')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Excludes'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_FilteredExcludes.ldif' % remote.data,
'excludeFilters' : ["objectclass=person","objectclass=organizationalunit"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FilteredExcludes.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['dc=example,dc=com',
'dc=com'],
'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Filtered Includes
#@TestID Filtered Includes
#@TestPurpose Verify an export of a LDIF file specifying multiple search filters control which entries are included in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_018" scope="local">
<testcase name="getTestCaseName('Export Filtered Includes')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Includes'
</message>
<call function="'exportLdifWithScript'">
{
'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
'includeFilters' : [ "objectclass=domain", "objectclass=organizationalunit"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['dc=example,dc=com',
'ou=People,dc=example,dc=com'],
'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Filtered Includes Complex
#@TestID Filtered Includes Complex
#@TestPurpose Verify an export of a LDIF file specifying complex search filters control which entries are included in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_019" scope="local">
<testcase name="getTestCaseName('Export Filtered Includes Complex')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Includes Complex'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_FilteredComplexIncludes.ldif' % remote.data,
'includeFilters' : ["|(objectclass=person)(objectclass=domain)(objectclass=organizationalunit)"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FilteredComplexIncludes.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Filtered Excludes Complex
#@TestID Filtered Excludes Complex
#@TestPurpose Verify an export of a LDIF file specifying complex search filters control which entries are excluded in the export.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_020" scope="local">
<testcase name="getTestCaseName('Export Filtered Excludes Complex')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Excludes Complex'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_FilteredComplexExcludes.ldif' % remote.data,
'excludeFilters' : ["&amp;(objectclass=person)(ou=Departed)"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FilteredComplexExcludes.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Fractional Filtered Mix
#@TestID Fractional Filtered Mix
#@TestPurpose Verify an export of a LDIF file specifying a mix of fractional and filtered.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_021" scope="local">
<testcase name="getTestCaseName('Export Fractional Filtered Mix')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Filtered Mix'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
'excludeFilters' : ["&amp;(objectclass=person)(ou=Departed)"],
'includeBranches' : ["dc=com"],
'excludeAttributes' : ["userpassword"]
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Append To LDIF
#@TestID Append To LDIF
#@TestPurpose Verify an export of a LDIF file specifying that the export process should append to the existing LDIF file.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_022" scope="local">
<testcase name="getTestCaseName('Export Append To LDIF')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Append To LDIF'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
'append' : 'True'
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
'dsAppend' : 'True' ,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Compress LDIF
#@TestID Compress LDIF
#@TestPurpose Verify an export where the LDIF file is compressed.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_023" scope="local">
<testcase name="getTestCaseName('Export Compress LDIF')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Compress LDIF'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/ExportCompressed.ldif' % remote.data,
'isCompressed' : 'True'
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/ExportCompressed.ldif' % remote.data,
'dsIsCompressed' : 'True' ,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Encrypt LDIF
#@TestID Encrypt LDIF
#@TestPurpose Verify an export where the LDIF file is encrypted.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_024" scope="local">
<testcase name="getTestCaseName('Export Encrypt LDIF')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Encrypt LDIF'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/ExportEncrypted.ldif' % remote.data,
'isEncrypted' : 'True'
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/ExportEncrypted.ldif' % remote.data,
'dsIsEncrypted' : 'True' ,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Export: Hash Signed LDIF
#@TestID Hash Signed LDIF
#@TestPurpose Verify an export where the LDIF file is hashed/signed.
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="backends_export_025" scope="local">
<testcase name="getTestCaseName('Hash Signed LDIF')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Hash Signed LDIF'
</message>
<!-- Known issue -->
<call function="'checktestRC'">
{ 'returncode' : 1 ,
'expected' : 0 ,
'result' : 'Hash Signed LDIF export is not implemented',
'issue' : '839'
}
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Wrap Column
#@TestID Wrap Column
#@TestPurpose Verify an export of a LDIF file containing wrapped columns
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<function name="backends_export_026" scope="local">
<testcase name="getTestCaseName('Export Wrap Column')">
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Wrap Column'
</message>
<call function="'exportLdifWithScript'">
{ 'ldifFile' : '%s/backends/ExportWrapCol.ldif' % remote.data,
'wrapColumn' : 25,
}
</call>
<call function="'ImportLdifWithScript'">
{ 'dsLdifFile' : '%s/backends/ExportWrapCol.ldif' % remote.data,
'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsInstancePort' : DsInstancePort
}
</call>
<call function="'checkImport'">
{ 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
'uid=kvaughan,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsPort' : DsInstancePort,
'dsAdminPort' : DsInstanceAdminPort,
'startDS' : 'no'
}
</call>
<!-- StopDS -->
<call function="'StopDsWithScript'">
{ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
</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>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Backend Export Tests
#@TestName Backend: Export: Error Codes
#@TestID Error Codes
#@TestPurpose Verify an export fails with an error code.
#@TestPreamble
#@TestSteps Client calls exportLdif with the parameters
default backend, and ldifFile. Import the ldifFile to
a second instance, then do a search to verify the import.
#@TestPostamble
#@TestResult Success if exportLdif, importLDIF, and checkImport returns 0
-->
<!-- Need to know what the error codes are -->
</stax>