export.xml revision 5391e649f8105a916728af586baf01e6a428d243
2N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
2N/A<!--
2N/A ! CDDL HEADER START
2N/A !
2N/A ! The contents of this file are subject to the terms of the
2N/A ! Common Development and Distribution License, Version 1.0 only
2N/A ! (the "License"). You may not use this file except in compliance
2N/A ! with the License.
2N/A !
2N/A ! You can obtain a copy of the license at
2N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
2N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
2N/A ! See the License for the specific language governing permissions
2N/A ! and limitations under the License.
2N/A !
2N/A ! When distributing Covered Code, exclude this CDDL HEADER in each
2N/A ! file and exclude the License file at
2N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
2N/A ! add the following below this CDDL HEADER, with the fields enclosed
2N/A ! by brackets "[]" replaced with your own identifying information:
2N/A ! Portions Copyright [yyyy] [name of copyright owner]
2N/A !
2N/A ! CDDL HEADER END
2N/A !
2N/A ! Copyright 2006-2008 Sun Microsystems, Inc.
2N/A ! -->
2N/A
2N/A<stax>
2N/A <defaultcall function="main_export"/>
2N/A <function name="main_export">
2N/A <sequence>
2N/A <block name="'export'">
2N/A <sequence>
2N/A <script>
2N/A if not CurrentTestPath.has_key('group'):
2N/A CurrentTestPath['group']='backends'
2N/A CurrentTestPath['suite']=STAXCurrentBlock
2N/A </script>
2N/A <call function="'testSuite_Preamble'"/>
2N/A <!--- Test Suite information
2N/A #@TestSuiteName Backend: Export: Export Tests
2N/A #@TestSuitePurpose Verify that the export functionality is working in the Directory Server.
2N/A #@TestSuiteID Backend Export Tests
2N/A #@TestSuiteGroup Export
2N/A #@TestGroup Backend
2N/A #@TestScript export.xml
2N/A #@TestHTMLLink http://opends.dev.java.net/
2N/A -->
2N/A <import machine="STAF_LOCAL_HOSTNAME"
2N/A file="'%s/testcases/backends/backend_setup.xml' % (TESTS_DIR)"/>
2N/A <call function="'backend_setup'">
2N/A { 'startDS' : False,
2N/A 'loadBackend' : True
2N/A }
2N/A </call>
2N/A
2N/A <!-- Create a second instance to import data that was exported from the first instance -->
2N/A <message>
2N/A 'Creating another instance for verifing the exports'
2N/A </message>
2N/A
2N/A <script>
2N/A DsInstancePort = int(DIRECTORY_INSTANCE_PORT)+1
2N/A DsInstanceAdminPort = int(DIRECTORY_INSTANCE_ADMIN_PORT)+1
2N/A DsInstanceDir = '%s/server2' % DIRECTORY_INSTANCE_DIR
2N/A </script>
2N/A
2N/A <call function="'createInstance'">
2N/A { 'dsHost' : '%s' % DIRECTORY_INSTANCE_HOST,
2N/A 'dsDir' : DsInstanceDir,
2N/A 'dsPort' : DsInstancePort,
2N/A 'dsAdminPort' : DsInstanceAdminPort,
2N/A 'dsBindDN' : '%s' % DIRECTORY_INSTANCE_DN,
2N/A 'dsBindPwd' : '%s' % DIRECTORY_INSTANCE_PSWD,
2N/A 'dsBaseDN' : '%s' % DIRECTORY_INSTANCE_SFX
2N/A }
2N/A </call>
2N/A
2N/A <!-- Set the server backup the way it was before the backend tests -->
2N/A <import machine="STAF_LOCAL_HOSTNAME"
2N/A file="'%s/testcases/quickstart/quickstart.xml' % (TESTS_DIR)"/>
2N/A <call function="'main_quickstart'" />
2N/A
2N/A <!--- Test Case information
2N/A #@TestMarker Backend Export Tests
2N/A #@TestName Backend: Export: LDIF Default
2N/A #@TestID LDIF Default
2N/A #@TestPurpose Verify an export of a LDIF file on the default backend.
2N/A #@TestPreamble
2N/A #@TestSteps Client calls exportLDIF with the parameters
2N/A default backend, and ldifFile. Import the ldifFile to
2N/A a second instance, then do a search to verify the import.
2N/A #@TestPostamble
2N/A #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
2N/A -->
2N/A <testcase name="getTestCaseName('Export default backend')">
2N/A <sequence>
2N/A <call function="'testCase_Preamble'" />
2N/A <message>
2N/A 'Backend: Export: Export default backend'
2N/A </message>
2N/A <call function="'exportLdif'">
2N/A {
2N/A 'ldifFile' : '%s/backends/Export_default.ldif' % remote.data,
2N/A 'backEnd' : '%s' % DIRECTORY_INSTANCE_BE
2N/A }
2N/A </call>
2N/A
2N/A <call function="'checktestRC'">
2N/A { 'returncode' : RC ,
2N/A 'result' : STAXResult
2N/A }
2N/A </call>
2N/A
2N/A <call function="'importLdif'">
2N/A { 'ldifFile' : '%s/backends/Export_default.ldif' % remote.data,
2N/A 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
2N/A }
2N/A </call>
2N/A
2N/A <call function="'checktestRC'">
2N/A { 'returncode' : RC,
2N/A 'result' : STAXResult
2N/A }
2N/A </call>
2N/A
2N/A <!-- StartDS -->
2N/A <call function="'StartDsWithScript'">
2N/A { 'location' : mylocation,
2N/A 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
2N/A </call>
2N/A
2N/A <!-- Wait for DS to start -->
2N/A <call function="'isAlive'">
2N/A { 'location' : mylocation,
2N/A 'noOfLoops' : 10 ,
2N/A 'noOfMilliSeconds' : 2000,
2N/A 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
2N/A 'dsInstancePort' : DsInstancePort
2N/A }
2N/A </call>
2N/A
2N/A <call function="'checkImport'">
2N/A { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
2N/A 'uid=kvaughan,ou=People,dc=example,dc=com',
2N/A 'uid=kwinters,ou=People,dc=example,dc=com'],
2N/A 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
2N/A 'dsPort' : DsInstancePort,
2N/A 'dsAdminPort' : DsInstanceAdminPort,
2N/A 'startDS' : 'no'
2N/A }
2N/A </call>
2N/A
2N/A <!-- StopDS -->
2N/A <call function="'StopDsWithScript'">
2N/A { 'location' : mylocation,
2N/A 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
2N/A 'dsAdminPort' : DsInstanceAdminPort,
2N/A 'dsBindDN' : mydn,
2N/A 'dsBindPwd' : mypswd
2N/A }
2N/A </call>
2N/A <call function="'testCase_Postamble'"/>
2N/A </sequence>
2N/A </testcase>
2N/A
2N/A <!--- Test Case information
2N/A #@TestMarker Backend Export Tests
2N/A #@TestName Backend: Export: LDIF Non Default
2N/A #@TestID LDIF Non Default
2N/A #@TestPurpose Verify an export of a LDIF file on a differrent backend to the default.
2N/A #@TestPreamble
2N/A #@TestSteps Client calls exportLDIF with the parameters
2N/A non-default backend, and ldifFile
2N/A #@TestPostamble
2N/A #@TestResult Success if Success if exportLDIF, importLDIF returns 0
2N/A -->
2N/A <testcase name="getTestCaseName('Export non-default backend')">
2N/A <sequence>
2N/A <call function="'testCase_Preamble'"/>
2N/A <message>
2N/A 'Backend: Export: Export non-default backend'
2N/A </message>
2N/A <call function="'exportLdif'">
2N/A { 'ldifFile' : '%s/backends/Export_schema.ldif' % remote.data,
2N/A 'backEnd' : 'schema'
2N/A }
2N/A </call>
2N/A
2N/A <call function="'checktestRC'">
2N/A { 'returncode' : RC ,
2N/A 'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_schema.ldif' % remote.data,
'backEnd' : 'schema',
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'knownIssue' : '2173'
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Include Branch')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Include Branch'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_IncludeBranch.ldif' % remote.data,
'extraParams' : '-b "dc=com"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_IncludeBranch.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Include Branches')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Include Branches'
</message>
<call function="'exportLdif'">
{
'ldifFile' : '%s/backends/Export_IncludeBranches.ldif' % remote.data,
'extraParams' : '-b "dc=com" -b "dc=example,dc=com"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_IncludeBranches.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Exclude Branch')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Exclude Branch'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_ExcludeBranch.ldif' % remote.data,
'extraParams' : '-B "dc=example,dc=com"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_ExcludeBranch.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Exclude Branches')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Exclude Branches'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_ExcludeBranches.ldif' % remote.data,
'extraParams' : '-B "ou=People,dc=example,dc=com" -B "dc=example,dc=com"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_ExcludeBranches.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Branches Mix')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Branches Mix'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_MixBranches.ldif' % remote.data,
'extraParams' : '-b "dc=com" -B "ou=People,dc=example,dc=com"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_MixBranches.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Include Attribute')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Include Attribute'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_IncludeAttr.ldif' % remote.data,
'extraParams' : '-i dc'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_IncludeAttr.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Include Attributes')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Include Attributes'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_IncludeAttrs.ldif' % remote.data,
'extraParams' : '-i dc -i cn -i ou -i sn -i uid'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_IncludeAttrs.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Exclude Attribute')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Exclude Attribute'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_ExcludeAttr.ldif' % remote.data,
'extraParams' : '-e userpassword'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_ExcludeAttr.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Exclude Attributes')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Exclude Attributes'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_ExcludeAttrs.ldif' % remote.data,
'extraParams' : '-e userpassword -e mail -e roomnumber'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_ExcludeAttrs.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Mix')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Mix'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_FractionalMix.ldif' % remote.data,
'extraParams' : '-i dc -i cn -i ou -i sn -i uid -b "dc=com" -b "dc=example,dc=com" -b "ou=People,dc=example,dc=com" -B "ou=Departed,ou=People,dc=example,dc=com"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FractionalMix.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Filtered Include')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Include'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredInclude.ldif' % remote.data,
'extraParams' : '-I "objectclass=*"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredInclude.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Filtered Includes')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Includes'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
'extraParams' : '-I "objectclass=domain" -I "objectclass=organizationalunit"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Filtered Exclude')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Exclude'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredExclude.ldif' % remote.data,
'extraParams' : '-E "objectclass=person"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredExclude.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Filtered Excludes')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Excludes'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredExcludes.ldif' % remote.data,
'extraParams' : '-E "objectclass=person" -E "objectclass=organizationalunit"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredExcludes.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Filtered Includes')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Includes'
</message>
<call function="'exportLdif'">
{
'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
'extraParams' : '-I "objectclass=domain" -I "objectclass=organizationalunit"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Filtered Includes Complex')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Includes Complex'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredComplexIncludes.ldif' % remote.data,
'extraParams' : '-I "|(objectclass=person)(objectclass=domain)(objectclass=organizationalunit)"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredComplexIncludes.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Filtered Excludes Complex')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Filtered Excludes Complex'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredComplexExcludes.ldif' % remote.data,
'extraParams' : '-E "&amp;(objectclass=person)(ou=Departed)"'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredComplexExcludes.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Fractional Filtered Mix')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Fractional Filtered Mix'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
'extraParams' : '-E "&amp;(objectclass=person)(ou=Departed)" -b "dc=com" -e userpassword'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Append To LDIF')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Append To LDIF'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
'extraParams' : '-a'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Compress LDIF')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Compress LDIF'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/ExportCompressed.ldif' % remote.data,
'extraParams' : '-c'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/ExportCompressed.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'extraParams' : '-c'}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<testcase name="getTestCaseName('Export Encrypt LDIF')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Encrypt LDIF'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/ExportEncrypted.ldif' % remote.data,
'extraParams' : '-y'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/ExportEncrypted.ldif' % remote.data,
'extraParams' : '-y',
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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
-->
<!--- 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
-->
<testcase name="getTestCaseName('Export Wrap Column')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Backend: Export: Export Wrap Column'
</message>
<call function="'exportLdif'">
{ 'ldifFile' : '%s/backends/ExportWrapCol.ldif' % remote.data,
'extraParams' : '--wrapColumn 25'
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<call function="'importLdif'">
{ 'ldifFile' : '%s/backends/ExportWrapCol.ldif' % remote.data,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<call function="'checktestRC'">
{ 'returncode' : RC ,
'result' : STAXResult
}
</call>
<!-- StartDS -->
<call function="'StartDsWithScript'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
}
</call>
<!-- Wait for DS to start -->
<call function="'isAlive'">
{ 'location' : mylocation,
'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'">
{ 'location' : mylocation,
'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
'dsAdminPort' : DsInstanceAdminPort,
'dsBindDN' : mydn,
'dsBindPwd' : mypswd
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- 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 -->
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/backends/backend_cleanup.xml' % (TESTS_DIR)"/>
<call function="'backend_cleanup'"> { 'stopDS' : False } </call>
<call function="'testSuite_Postamble'"/>
</sequence>
</block>
</sequence>
</function>
</stax>