5693N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
5693N/A ! The contents of this file are subject to the terms of the 5693N/A ! Common Development and Distribution License, Version 1.0 only 5693N/A ! (the "License"). You may not use this file except in compliance 6982N/A ! You can obtain a copy of the license at 5693N/A ! See the License for the specific language governing permissions 6982N/A ! and limitations under the License. 6982N/A ! When distributing Covered Code, include this CDDL HEADER in each 6982N/A ! file and include the License file at 6982N/A ! add the following below this CDDL HEADER, with the fields enclosed 5693N/A ! by brackets "[]" replaced with your own identifying information: 5693N/A ! Portions Copyright [yyyy] [name of copyright owner] 5693N/A ! Copyright 2009-2010 Sun Microsystems, Inc. 5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Import Tasks: LDIF Default 5693N/A #@TestPurpose Verify an import task of a LDIF file using the default backend. 5693N/A <
function name="backends_import_tasks_001" scope="local">
5693N/A <
testcase name="getTestCaseName('LDIF Default')">
5693N/A <
call function="'testCase_Preamble'"/>
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
5693N/A 'uid=dmiller, ou=People, dc=example,dc=com',
5693N/A 'uid=rhunt, ou=People, dc=example,dc=com'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import TasksTests 5693N/A #@TestName Backend: Import Tasks: LDIF Non Default 5693N/A #@TestPurpose Verify an import task of a LDIF file using a differrent backend to the default. 5693N/A <
function name="backends_import_tasks_002" scope="local">
5693N/A <
testcase name="getTestCaseName('LDIF Non Default')">
5693N/A <
call function="'testCase_Preamble'"/>
5693N/A createBackendOptions=' '.join(options)
5693N/A <
call function="'dsconfig'">
5693N/A { 'subcommand' : 'create-backend',
5693N/A 'optionsString' : createBackendOptions
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=non-default,dc=com',
5693N/A 'uid=dmiller, ou=People, dc=non-default,dc=com',
5693N/A 'uid=rhunt, ou=People, dc=non-default,dc=com'] ,
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Include Branch 5693N/A #@TestID Fractional Include Branch 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying a branch that should be included in the import. 5693N/A <
function name="backends_import_tasks_003" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Include Branch')">
5693N/A <
call function="'testCase_Preamble'"/>
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'includeBranches' : ['dc=com'],
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
5693N/A 'uid=dmiller, ou=People, dc=example,dc=com',
5693N/A 'uid=rhunt, ou=People, dc=example,dc=com'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Include Branches 5693N/A #@TestID Fractional Include Branches 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying multiple branches that should be included in the import. 5693N/A <
function name="backends_import_tasks_004" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Include Branches')">
5693N/A <
call function="'testCase_Preamble'"/>
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'includeBranches' : ['dc=com','dc=example,dc=com']
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
5693N/A 'uid=dmiller, ou=People, dc=example,dc=com',
5693N/A 'uid=rhunt, ou=People, dc=example,dc=com'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Exclude Branch 5693N/A #@TestID Fractional Exclude Branch 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying a branch that should be excluded in the import. 5693N/A <
function name="backends_import_tasks_005" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Exclude Branch')">
5693N/A <
call function="'testCase_Preamble'" />
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'taskID' : STAXCurrentTestcase,
5693N/A 'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com'],
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
5693N/A 'uid=dmiller, ou=People, dc=example,dc=com',
5693N/A 'uid=rhunt, ou=People, dc=example,dc=com'],
5693N/A 'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
5693N/A 'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Exclude Branches 5693N/A #@TestID Fractional Exclude Branches 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying multiple branches that should be excluded in the import. 5693N/A <
function name="backends_import_tasks_006" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Exclude Branches')">
5693N/A <
call function="'testCase_Preamble'" />
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'taskID' : STAXCurrentTestcase,
5693N/A 'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com',
5693N/A 'cn=QA Managers,ou=groups,dc=example,dc=com']
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
5693N/A 'uid=dmiller, ou=People, dc=example,dc=com',
5693N/A 'uid=rhunt, ou=People, dc=example,dc=com'],
5693N/A 'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
5693N/A 'uid=brammage,ou=Departed,ou=People,dc=example,dc=com',
5693N/A 'uid=bbaret,cn=QA Managers,ou=groups,dc=example,dc=com'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Branches Mix 5693N/A #@TestID Fractional Branches Mix 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying a mix of include and exclude branches. 5693N/A <
function name="backends_import_tasks_007" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Branches Mix')">
5693N/A <
call function="'testCase_Preamble'"/>
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'includeBranches' : ['dc=com'],
5693N/A 'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com'],
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
5693N/A 'uid=dmiller, ou=People, dc=example,dc=com',
5693N/A 'uid=rhunt, ou=People, dc=example,dc=com'],
5693N/A 'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
5693N/A 'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Include Attribute 5693N/A #@TestID Fractional Include Attribute 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying an attribute that should be included in the import. 5693N/A <
function name="backends_import_tasks_008" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Include Attribute')">
5693N/A <
call function="'testCase_Preamble'" />
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'includeAttributes' : ['dc'],
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['dc=com','dc=example,dc=com'],
5693N/A 'missingEntries' : ['ou=People,dc=example,dc=com'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Include Attributes 5693N/A #@TestID Fractional Include Attributes 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying multiple attributes that should be included in the import. 5693N/A <
function name="backends_import_tasks_009" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Include Attributes')">
5693N/A <
call function="'testCase_Preamble'" />
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'includeAttributes' : ['dc','cn','ou','sn']
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
5693N/A 'uid=dmiller,ou=People,dc=example,dc=com',
5693N/A 'uid=rhunt,ou=People,dc=example,dc=com'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Exclude Attribute 5693N/A #@TestID Fractional Exclude Attribute 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying an attribute that should be excluded in the import. 5693N/A <
function name="backends_import_tasks_010" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Exclude Attribute')">
5693N/A <
call function="'testCase_Preamble'" />
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'excludeAttributes' : ['userpassword']
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com'],
5693N/A 'missingAttributes' : ['userpassword'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Exclude Attributes 5693N/A #@TestID Fractional Exclude Attributes 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying multiple attribute that should be excluded in the import. 5693N/A <
function name="backends_import_tasks_011" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Exclude Attributes')">
5693N/A <
call function="'testCase_Preamble'" />
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'excludeAttributes' : ['userpassword','mail','roomnumber']
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com'],
5693N/A 'missingAttributes' : ['userpassword','mail','roomnumber'],
5693N/A <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
5693N/A <
message log="1" level="'fatal'">
5693N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5693N/A <
call function="'testCase_Postamble'"/>
5693N/A <!--- Test Case information 5693N/A #@TestMarker Backend Import Tasks Tests 5693N/A #@TestName Backend: Import Tasks: Fractional Mix 5693N/A #@TestPurpose Verify an import task of a LDIF file specifying a mix of fractional attributes and branches. 5693N/A <
function name="backends_import_tasks_012" scope="local">
5693N/A <
testcase name="getTestCaseName('Fractional Mix')">
5693N/A <
call function="'testCase_Preamble'" />
5693N/A <
call function="'ImportLdifWithScript'">
5693N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5693N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
5693N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5693N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5693N/A 'includeBranches' : ['dc=com','dc=example,dc=com','ou=People,dc=example,dc=com'],
5693N/A 'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com'],
5693N/A 'includeAttributes' : ['dc','cn','ou','sn'],
5693N/A <
call function="'checkImport'">
5693N/A { 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
5693N/A 'uid=dmiller, ou=People, dc=example,dc=com',
5693N/A 'uid=rhunt, ou=People, dc=example,dc=com'],
5693N/A 'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
5693N/A 'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Filtered Include #@TestID Filtered Include #@TestPurpose Verify an import task of a LDIF file specifying a search filter control which entries are included in the import. <
function name="backends_import_tasks_013" scope="local">
<
testcase name="getTestCaseName('Filtered Include')">
<
call function="'testCase_Preamble'" />
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'includeFilters' : ['objectclass=*'],
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Filtered Exclude #@TestID Filtered Exclude #@TestPurpose Verify an import task of a LDIF file specifying a search filter control which entries are excluded in the import. <
function name="backends_import_tasks_014" scope="local">
<
testcase name="getTestCaseName('Filtered Exclude')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'excludeFilters' : ['objectclass=person'],
<
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'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Filtered Includes #@TestID Filtered Includes #@TestPurpose Verify an import task of a LDIF file specifying multiple search filters control which entries are included in the import. <
function name="backends_import_tasks_015" scope="local">
<
testcase name="getTestCaseName('Filtered Includes')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'includeFilters' : ['objectclass=domain*','objectclass=organizationalunit']
<
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'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Filtered Excludes #@TestID Filtered Excludes #@TestPurpose Verify an import task of a LDIF file specifying multiple search filters control which entries are excluded in the import. <
function name="backends_import_tasks_016" scope="local">
<
testcase name="getTestCaseName('Filtered Excludes')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'excludeFilters' : ['objectclass=person','objectclass=organizationalunit'],
<
call function="'checkImport'">
{ 'expectedEntries' : ['dc=example,dc=com'],
'missingEntries' : ['ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Filtered Includes Complex #@TestID Filtered Includes Complex #@TestPurpose Verify an import task of a LDIF file specifying complex search filters control which entries are included in the import. <
function name="backends_import_tasks_017" scope="local">
<
testcase name="getTestCaseName('Filtered Includes Complex')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'includeFilters' : ['|(objectclass=person)(objectclass=domain)(objectclass=organizationalunit)'],
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Filtered Excludes Complex #@TestID Filtered Excludes Complex #@TestPurpose Verify an import task of a LDIF file specifying complex search filters control which entries are excluded in the import. <
function name="backends_import_tasks_018" scope="local">
<
testcase name="getTestCaseName('Filtered Excludes Complex')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'excludeFilters' : ['&(objectclass=person)(ou=Departed)'],
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=rhunt,ou=People,dc=example,dc=com'],
'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Fractional Filtered Mix #@TestID Fractional Filtered Mix #@TestPurpose Verify an import task of a LDIF file specifying a mix of fractional and filtered. <
function name="backends_import_tasks_019" scope="local">
<
testcase name="getTestCaseName('Fractional Filtered Mix')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'excludeFilters' : ['&(objectclass=person)(ou=Departed)'],
'includeBranches' : ['dc=com'],
'excludeAttributes' : ['userpassword']
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com'],
'missingAttributes' : ['userpassword'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Append #@TestPurpose Verify an import task of a LDIF file specifying that the import process should append to the existing database. <
function name="backends_import_tasks_020" scope="local">
<
testcase name="getTestCaseName('Append')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
<
call function="'checkImport'">
{ 'expectedEntries' : ['ou=Departed,ou=People,dc=example,dc=com',
'uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks:Append Replace Existing #@TestID Append Replace Existing #@TestPurpose Verify an import task of a LDIF file specifying that an existing entry should be replaced when appending to an existing database. <
function name="backends_import_tasks_021" scope="local">
<
testcase name="getTestCaseName('Append Replace Existing')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'replaceExisting' : 'TRUE'
<
call function="'checkImport'">
{ 'expectedEntries' : ['ou=Departed,ou=People,dc=example,dc=com',
'uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Compressed #@TestPurpose Verify an import task of a LDIF file specifying the data to import is compressed. <
function name="backends_import_tasks_022" scope="local">
<
testcase name="getTestCaseName('Compressed')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Encrypted #@TestPurpose Verify an import task of a LDIF file specifying the data to import is encrypted. <
function name="backends_import_tasks_023" scope="local">
<
testcase name="getTestCaseName('Encrypted')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
<
call function="'checktestRC'">
'result' : 'Encrypted LDIF export is not implemented',
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Hashed Signed #@TestPurpose Verify an import task of a LDIF file specifying the data to import is hashed/signed. <
function name="backends_import_tasks_024" scope="local">
<
testcase name="getTestCaseName('Signed Hash')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
<
call function="'checktestRC'">
'result' : 'Signed Hash import is not implemented',
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Rejects File #@TestPurpose Verify an import task of a LDIF file specifying the a path to a file into which rejected entries may be written if they are not accepted during the import process, when the rejects file is not overwritten. <
function name="backends_import_tasks_025" scope="local">
<
testcase name="getTestCaseName('Rejects File')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
<!-- Should check there is a rejects file and the contents are correct --> <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Rejects File Overwrite #@TestID Rejects File Overwrite #@TestPurpose Verify an import task of a LDIF file specifying the a path to a file into which rejected entries may be written if they are not accepted during the import process, when the rejects file is overwritten. <
function name="backends_import_tasks_026" scope="local">
<
testcase name="getTestCaseName('Overwrite Rejects File')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=rhunt,ou=People,dc=example,dc=com'],
<!-- Should check there is a rejects file and the contents are correct --> <
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Skip Schema Validation Accept #@TestID Skip Schema Validation Accept #@TestPurpose Verify an import task of a LDIF file containing invalided schema is accepted when skip schema validation is specified <
function name="backends_import_tasks_027" scope="local">
<
testcase name="getTestCaseName('Skip Schema Validation Accept')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'skipSchemaValidation' : 'TRUE'
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=dmiller,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Skip Schema Validation Reject #@TestID Skip Schema Validation Reject #@TestPurpose Verify an import task of a LDIF file containing invalid schema is rejected when skip schema validation is not specified <
function name="backends_import_tasks_028" scope="local">
<
testcase name="getTestCaseName('Skip Schema Validation Reject')">
<
call function="'testCase_Preamble'"/>
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=dmiller,ou=People,dc=example,dc=com'],
'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
'uid=kwinters,ou=People,dc=example,dc=com'],
<
catch exception="'STAXException.*'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Import Tasks Tests #@TestName Backend: Import Tasks: Error Codes #@TestPurpose Verify an import task fails with an error code. <!-- Need to know what the error codes are -->