mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gary_williams
21.59.2009 c6b5f75749702af270d574ed5dbe392b486bc6a9
Re-commit functional tests backends import(-tasks)/export(-tasks) improvements
4 files modified
10514 ■■■■ changed files
opends/tests/staf-tests/functional-tests/testcases/backends/export-tasks/export-tasks_tests.xml 694 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/backends/export/export_tests.xml 4151 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/backends/import-tasks/import-tasks_tests.xml 2793 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/backends/import/import_tests.xml 2876 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/backends/export-tasks/export-tasks_tests.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../../shared/stax.dtd">
<!DOCTYPE stax SYSTEM "../../../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
@@ -23,373 +23,335 @@
 !
 ! CDDL HEADER END
 !
 !      Copyright 2006-2009 Sun Microsystems, Inc.
 !      Copyright 2009 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_export-tasks"/>
  <function name="main_export-tasks">
    <sequence>
      <block name="'export-tasks'">
        <try>
          <sequence>
            <script>
              if not CurrentTestPath.has_key('group'):
                CurrentTestPath['group']='backends'
              CurrentTestPath['suite']=STAXCurrentBlock
            </script>
            <call function="'testSuite_Preamble'" />
            <!--- Test Suite information
              #@TestSuiteName       Backend Export Tasks Tests
              #@TestSuitePurpose    Verify that the basic export task functionality is working in the Directory Server.
              #@TestSuiteID         Export Tasks Tests
              #@TestSuiteGroup      Export Tasks
              #@TestGroup           Backend
              #@TestScript          export.xml
              #@TestHTMLLink        http://opends.dev.java.net/
            -->
            <call function="'common_setup'">
              {
                'quickStart'  : False ,
                'loadData'    : False ,
                'startServer' : True ,
                'stopServer'  : False
              }
            </call>
            <sequence>
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Export Tasks 1
                #@TestID              ExportTasks1
                #@TestPurpose         Verify an export task of a LDIF file on the default backend.
                #@TestPreamble
                #@TestSteps           An ldif file is created that describes the export task to be
                                      scheduled. The task is scheduled by adding the ldif file
                                      with the static ldapmodify.
                #@TestPostamble
                #@TestResult          Success if OpenDS returns 0
              -->
              <testcase name="getTestCaseName('Test 1')">
                <sequence>
                  <call function="'testCase_Preamble'"/>
                  <message>
                    'Backend ExportTasks1: Export the data in OpenDS by scheduling a task'
                  </message>
                  <call function="'exportLdifTask'">
                    { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
                      'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
                      'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
                      'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
                      'taskID'         : '1',
                      'ldifFile'       : '%s/backends/ExportTasks1.ldif' % remote.data
                    }
                  </call>
                  <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult
                    }
                  </call>
                  <call function="'testCase_Postamble'" />
                </sequence>
              </testcase>
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: LDIF Default
                #@TestID              LDIF Default
                #@TestPurpose         Verify an export task of a LDIF file on the default backend.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: LDIF Non Default
                #@TestID              LDIF Non Default
                #@TestPurpose         Verify an export task of a LDIF file on a differrent backend to the default.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Include Branch
                #@TestID              Fractional Include Branch
                #@TestPurpose         Verify an export task of a LDIF file specifying a branch that should be included in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Include Branches
                #@TestID              Fractional Include Branches
                #@TestPurpose         Verify an export task of a LDIF file specifying multiple branches that should be included in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Exclude Branch
                #@TestID              Fractional Exclude Branch
                #@TestPurpose         Verify an export task of a LDIF file specifying a branch that should be excluded in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Exclude Branches
                #@TestID              Fractional Exclude Branches
                #@TestPurpose         Verify an export task of a LDIF file specifying multiple branches that should be excluded in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Branches Mix
                #@TestID              Fractional Branches Mix
                #@TestPurpose         Verify an export task of a LDIF file specifying a mix of include and exclude branches.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Include Attribute
                #@TestID              Fractional Include Attribute
                #@TestPurpose         Verify an export task of a LDIF file specifying an attribute that should be included in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Include Attributes
                #@TestID              Fractional Include Attributes
                #@TestPurpose         Verify an export task of a LDIF file specifying multiple attributes that should be included in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Exclude Attribute
                #@TestID              Fractional Exclude Attribute
                #@TestPurpose         Verify an export task of a LDIF file specifying an attribute that should be excluded in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Exclude Attributes
                #@TestID              Fractional Exclude Attributes
                #@TestPurpose         Verify an export task of a LDIF file specifying multiple attribute that should be excluded in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Mix
                #@TestID              Fractional Mix
                #@TestPurpose         Verify an export task of a LDIF file specifying a mix of fractional attributes and branches.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Filtered Include
                #@TestID              Filtered Include
                #@TestPurpose         Verify an export task of a LDIF file specifying a search filter control which entries are included in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Filtered Includes
                #@TestID              Filtered Includes
                #@TestPurpose         Verify an export task of a LDIF file specifying a search filter control which entries are included in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Filtered Excludes
                #@TestID              Filtered Excludes
                #@TestPurpose         Verify an export task of a LDIF file specifying multiple search filters control which entries are excluded in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Filtered Includes
                #@TestID              Filtered Includes
                #@TestPurpose         Verify an export task of a LDIF file specifying multiple search filters control which entries are included in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Filtered Excludes Complex
                #@TestID              Filtered Excludes Complex
                #@TestPurpose         Verify an export task of a LDIF file specifying complex search filters control which entries are excluded in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Filtered Excludes Complex
                #@TestID              Filtered Excludes Complex
                #@TestPurpose         Verify an export task of a LDIF file specifying complex search filters control which entries are excluded in the export task.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Fractional Filtered Mix
                #@TestID              Fractional Filtered Mix
                #@TestPurpose         Verify an export task of a LDIF file specifying a mix of fractional and filtered.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Append To LDIF
                #@TestID              Append To LDIF
                #@TestPurpose         Verify an export task of a LDIF file specifying that the export task process should append to the existing LDIF file.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Compress LDIF
                #@TestID              Compress LDIF
                #@TestPurpose         Verify an export task where the LDIF file is compressed.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Encrypt LDIF
                #@TestID              Encrypt LDIF
                #@TestPurpose         Verify an export task where the LDIF file is encrypted.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Hash Signed LDIF
                #@TestID              Hash Signed LDIF
                #@TestPurpose         Verify an export task where the LDIF file is hashed/signed.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Wrap Column
                #@TestID              Wrap Column
                #@TestPurpose         Verify an export task of a LDIF file containing wrapped columns
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
              <!--- Test Case information
                #@TestMarker          Backend Export Tasks Tests
                #@TestName            Export Tasks: Error Codes
                #@TestID              Error Codes
                #@TestPurpose         Verify an export task fails with an error code.
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
            </sequence>
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Export Tasks 1
    #@TestID              ExportTasks1
    #@TestPurpose         Verify an export task of a LDIF file on the default backend.
    #@TestPreamble
    #@TestSteps           An ldif file is created that describes the export task to be
                          scheduled. The task is scheduled by adding the ldif file
                          with the static ldapmodify.
    #@TestPostamble
    #@TestResult          Success if OpenDS returns 0
  -->
  <function name="backends_export_tasks_001" scope="local">
    <testcase name="getTestCaseName('LDIF Default')">
      <try>
        <sequence>
  
          </sequence>
          <finally>
            <sequence>
              <!-- Test Suite Cleanup -->
              <message>'Finally: Global Backup Cleanup.'</message>
              <try>
                <try>
                  <call function="'common_cleanup'" />
                <catch exception="'STAFException'">
                  <sequence>
                    <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
                  </sequence>
                </catch>
                </try>
              <finally>
                <call function="'testSuite_Postamble'"/>
              </finally>
              </try>
            </sequence>
          </finally>
        </try>
      </block>
    </sequence>
          <call function="'testCase_Preamble'"/>
          <message>
            'Backend ExportTasks1: Export the data in OpenDS by scheduling a task'
          </message>
          <call function="'exportLdifTask'">
            { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
              'taskID'         : '1',
              'ldifFile'       : '%s/backends/ExportTasks1.ldif' % remote.data
            }
          </call>
        </sequence>
        <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
          <message log="1" level="'fatal'">
            '%s: Test failed. eInfo(%s)' % (eType,eInfo)
          </message>
        </catch>
        <finally>
          <call function="'testCase_Postamble'"/>
        </finally>
      </try>
    </testcase>
  </function>
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: LDIF Default
    #@TestID              LDIF Default
    #@TestPurpose         Verify an export task of a LDIF file on the default backend.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: LDIF Non Default
    #@TestID              LDIF Non Default
    #@TestPurpose         Verify an export task of a LDIF file on a differrent backend to the default.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Include Branch
    #@TestID              Fractional Include Branch
    #@TestPurpose         Verify an export task of a LDIF file specifying a branch that should be included in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Include Branches
    #@TestID              Fractional Include Branches
    #@TestPurpose         Verify an export task of a LDIF file specifying multiple branches that should be included in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Exclude Branch
    #@TestID              Fractional Exclude Branch
    #@TestPurpose         Verify an export task of a LDIF file specifying a branch that should be excluded in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Exclude Branches
    #@TestID              Fractional Exclude Branches
    #@TestPurpose         Verify an export task of a LDIF file specifying multiple branches that should be excluded in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Branches Mix
    #@TestID              Fractional Branches Mix
    #@TestPurpose         Verify an export task of a LDIF file specifying a mix of include and exclude branches.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Include Attribute
    #@TestID              Fractional Include Attribute
    #@TestPurpose         Verify an export task of a LDIF file specifying an attribute that should be included in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Include Attributes
    #@TestID              Fractional Include Attributes
    #@TestPurpose         Verify an export task of a LDIF file specifying multiple attributes that should be included in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Exclude Attribute
    #@TestID              Fractional Exclude Attribute
    #@TestPurpose         Verify an export task of a LDIF file specifying an attribute that should be excluded in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Exclude Attributes
    #@TestID              Fractional Exclude Attributes
    #@TestPurpose         Verify an export task of a LDIF file specifying multiple attribute that should be excluded in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Mix
    #@TestID              Fractional Mix
    #@TestPurpose         Verify an export task of a LDIF file specifying a mix of fractional attributes and branches.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Filtered Include
    #@TestID              Filtered Include
    #@TestPurpose         Verify an export task of a LDIF file specifying a search filter control which entries are included in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Filtered Includes
    #@TestID              Filtered Includes
    #@TestPurpose         Verify an export task of a LDIF file specifying a search filter control which entries are included in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Filtered Excludes
    #@TestID              Filtered Excludes
    #@TestPurpose         Verify an export task of a LDIF file specifying multiple search filters control which entries are excluded in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Filtered Includes
    #@TestID              Filtered Includes
    #@TestPurpose         Verify an export task of a LDIF file specifying multiple search filters control which entries are included in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Filtered Excludes Complex
    #@TestID              Filtered Excludes Complex
    #@TestPurpose         Verify an export task of a LDIF file specifying complex search filters control which entries are excluded in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Filtered Excludes Complex
    #@TestID              Filtered Excludes Complex
    #@TestPurpose         Verify an export task of a LDIF file specifying complex search filters control which entries are excluded in the export task.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Fractional Filtered Mix
    #@TestID              Fractional Filtered Mix
    #@TestPurpose         Verify an export task of a LDIF file specifying a mix of fractional and filtered.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Append To LDIF
    #@TestID              Append To LDIF
    #@TestPurpose         Verify an export task of a LDIF file specifying that the export task process should append to the existing LDIF file.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Compress LDIF
    #@TestID              Compress LDIF
    #@TestPurpose         Verify an export task where the LDIF file is compressed.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Encrypt LDIF
    #@TestID              Encrypt LDIF
    #@TestPurpose         Verify an export task where the LDIF file is encrypted.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Hash Signed LDIF
    #@TestID              Hash Signed LDIF
    #@TestPurpose         Verify an export task where the LDIF file is hashed/signed.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Wrap Column
    #@TestID              Wrap Column
    #@TestPurpose         Verify an export task of a LDIF file containing wrapped columns
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <!--- Test Case information
    #@TestMarker          Backend Export Tasks Tests
    #@TestName            Export Tasks: Error Codes
    #@TestID              Error Codes
    #@TestPurpose         Verify an export task fails with an error code.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
</stax>
opends/tests/staf-tests/functional-tests/testcases/backends/export/export_tests.xml
Diff too large
opends/tests/staf-tests/functional-tests/testcases/backends/import-tasks/import-tasks_tests.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../../shared/stax.dtd">
<!DOCTYPE stax SYSTEM "../../../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
@@ -23,1122 +23,1693 @@
 !
 ! CDDL HEADER END
 !
 !      Copyright 2006-2009 Sun Microsystems, Inc.
 !      Copyright 2009 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_import-tasks"/>
  <function name="main_import-tasks">
    <sequence>
      <block name="'import-tasks'">
        <try>
          <sequence>
            <script>
              if not CurrentTestPath.has_key('group'):
                CurrentTestPath['group']='backends'
              CurrentTestPath['suite']=STAXCurrentBlock
            </script>
            <call function="'testSuite_Preamble'"/>
  <!--- Test Case information
    #@TestMarker          Backend Import Tasks Tests
    #@TestName            Import Tasks: LDIF Default
    #@TestID              LDIF Default
    #@TestPurpose         Verify an import task of a LDIF file using the default backend.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
  -->
  <function name="backends_import_tasks_001" scope="local">
    <testcase name="getTestCaseName('LDIF Default')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
              'taskID'         : STAXCurrentTestcase,
              'ldifFile'       : '%s/backends/Example.ldif' % remote.data
            }
          </call>
          <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'],
               'startDS'        : 'no'
             }
          </call>
        </sequence>
        <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
          <message log="1" level="'fatal'">
            '%s: Test failed. eInfo(%s)' % (eType,eInfo)
          </message>
        </catch>
  
            <!--- Test Suite information
              #@TestSuiteName       Backend Import Tasks Tests
              #@TestSuitePurpose    Verify that the basic import using the task based functionality is working in the Directory Server.
              #@TestSuiteID         Import Tasks Tests
              #@TestSuiteGroup      Import-Tasks
              #@TestGroup           Backend
              #@TestScript          import-tasks.xml
              #@TestHTMLLink        http://opends.dev.java.net/
            -->
            <call function="'common_setup'">
              {
                'quickStart'  : False ,
                'loadData'    : False ,
                'startServer' : True ,
                'stopServer'  : False
              }
            </call>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Import Tasks: LDIF Default
              #@TestID              LDIF Default
              #@TestPurpose         Verify an import task of a LDIF file using the default backend.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('LDIF Default')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
                    'taskID'         : STAXCurrentTestcase,
                    'ldifFile'       : '%s/backends/Example.ldif' % remote.data
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                     'startDS'        : 'no'
                   }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Include Branch
              #@TestID              Fractional Include Branch
              #@TestPurpose         Verify an import task of a LDIF file specifying a branch that should be included in the import.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Include Branch')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
                    'includeBranches' : ['dc=com'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Include Branches
              #@TestID              Fractional Include Branches
              #@TestPurpose         Verify an import task of a LDIF file specifying multiple branches that should be included in the import.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Include Branches')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
                    'includeBranches' : ['dc=com','dc=example,dc=com']
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Exclude Branch
              #@TestID              Fractional Exclude Branch
              #@TestPurpose         Verify an import task of a LDIF file specifying a branch that should be excluded in the import.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Exclude Branch')">
              <sequence>
                <call function="'testCase_Preamble'" />
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
                    'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                         'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Exclude Branches
              #@TestID              Fractional Exclude Branches
              #@TestPurpose         Verify an import task of a LDIF file specifying multiple branches that should be excluded in the import.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Exclude Branches')">
              <sequence>
                <call function="'testCase_Preamble'" />
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
                    'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com',
                                         'cn=QA Managers,ou=groups,dc=example,dc=com']
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                         'uid=brammage,ou=Departed,ou=People,dc=example,dc=com',
                                         'uid=bbaret,cn=QA Managers,ou=groups,dc=example,dc=com'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Branches Mix
              #@TestID              Fractional Branches Mix
              #@TestPurpose         Verify an import task of a LDIF file specifying a mix of include and exclude branches.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Branches Mix')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
                    'includeBranches' : ['dc=com'],
                    'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                         'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Include Attribute
              #@TestID              Fractional Include Attribute
              #@TestPurpose         Verify an import task of a LDIF file specifying an attribute that should be included in the import.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Include Attribute')">
              <sequence>
                <call function="'testCase_Preamble'" />
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
                    'taskID'            : STAXCurrentTestcase,
                    'ldifFile'          : '%s/backends/Include.ldif' % remote.data,
                    'includeAttributes' : ['dc'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries' : ['dc=com','dc=example,dc=com'],
                    'missingEntries'  : ['ou=People,dc=example,dc=com'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Include Attributes
              #@TestID              Fractional Include Attributes
              #@TestPurpose         Verify an import task of a LDIF file specifying multiple attributes that should be included in the import.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Include Attributes')">
              <sequence>
                <call function="'testCase_Preamble'" />
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
                    'includeAttributes' : ['dc','cn','ou','sn']
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Exclude Attribute
              #@TestID              Fractional Exclude Attribute
              #@TestPurpose         Verify an import task of a LDIF file specifying an attribute that should be excluded in the import.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Exclude Attribute')">
              <sequence>
                <call function="'testCase_Preamble'" />
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
                    'taskID'            : STAXCurrentTestcase,
                    'ldifFile'          : '%s/backends/Exclude.ldif' % remote.data,
                    'excludeAttributes' : ['userpassword']
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
                    'missingAttributes' : ['userpassword'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Exclude Attributes
              #@TestID              Fractional Exclude Attributes
              #@TestPurpose         Verify an import task of a LDIF file specifying multiple attribute that should be excluded in the import.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Exclude Attributes')">
              <sequence>
                <call function="'testCase_Preamble'" />
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
                    'taskID'            : STAXCurrentTestcase,
                    'ldifFile'          : '%s/backends/Exclude.ldif' % remote.data,
                    'excludeAttributes' : ['userpassword','mail','roomnumber']
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
                    'missingAttributes' : ['userpassword','mail','roomnumber'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Fractional Mix
              #@TestID              Fractional Mix
              #@TestPurpose         Verify an import task of a LDIF file specifying a mix of fractional attributes and branches.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Mix')">
              <sequence>
                <call function="'testCase_Preamble'" />
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
                    'taskID'            : STAXCurrentTestcase,
                    'ldifFile'          : '%s/backends/Exclude.ldif' % remote.data,
                    'includeBranches'   : ['dc=com','dc=example,dc=com','ou=People,dc=example,dc=com'],
                    'excludeBranches'   : ['ou=Departed,ou=People,dc=example,dc=com'],
                    'includeAttributes' : ['dc','cn','ou','sn'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                         'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Include')">
              <sequence>
                <call function="'testCase_Preamble'" />
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
                    'includeFilters'  : ['objectclass=*'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Exclude')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
                    'excludeFilters'  : ['objectclass=person'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Includes')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
                    'includeFilters'  : ['objectclass=domain*','objectclass=organizationalunit']
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Excludes')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
                    'excludeFilters'  : ['objectclass=person','objectclass=organizationalunit'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries' : ['dc=example,dc=com'],
                    'missingEntries'  : ['ou=People,dc=example,dc=com'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Includes Complex')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
                    'includeFilters'  : ['|(objectclass=person)(objectclass=domain)(objectclass=organizationalunit)'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Excludes Complex')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
                    'excludeFilters'  : ['&amp;(objectclass=person)(ou=Departed)'],
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries' : ['uid=rhunt,ou=People,dc=example,dc=com'],
                    'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Filtered Mix')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
                    'taskID'            : STAXCurrentTestcase,
                    'ldifFile'          : '%s/backends/Exclude.ldif' % remote.data,
                    'excludeFilters'    : ['&amp;(objectclass=person)(ou=Departed)'],
                    'includeBranches'   : ['dc=com'],
                    'excludeAttributes' : ['userpassword']
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
                    'missingAttributes' : ['userpassword'],
                    'startDS'           : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Append
              #@TestID              Append
              #@TestPurpose         Verify an import task of a LDIF file specifying that the import process should append to the existing database.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Append')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
                    'taskID'         : STAXCurrentTestcase,
                    'ldifFile'       : '%s/backends/Append.ldif' % remote.data,
                    'append'         : 'TRUE'
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Append Replace Existing')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
                    'taskID'          : STAXCurrentTestcase,
                    'ldifFile'        : '%s/backends/Append.ldif' % remote.data,
                    'append'          : 'TRUE',
                    'replaceExisting' : 'TRUE'
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Compressed
              #@TestID              Compressed
              #@TestPurpose         Verify an import task of a LDIF file specifying the data to import is compressed.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Compressed')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
                    'taskID'         : STAXCurrentTestcase,
                    'ldifFile'       : '%s/backends/Example.ldif.gz' % remote.data,
                    'isCompressed'   : 'TRUE'
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Encrypted
              #@TestID              Encrypted
              #@TestPurpose         Verify an import task of a LDIF file specifying the data to import is encrypted.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Encrypted')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
                    'taskID'         : STAXCurrentTestcase,
                    'ldifFile'       : '%s/backends/Example.ldif' % remote.data,
                    'isEncrypted'    : 'TRUE'
                  }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : 1 ,
                    'expected'   : 0 ,
                    'result'     : 'Encrypted LDIF export is not implemented',
                    'issue'      : '839'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Hashed Signed
              #@TestID              Hashed Signed
              #@TestPurpose         Verify an import task of a LDIF file specifying the data to import is hashed/signed.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <!-- Test Not Implemented. Feature not avaliable -->
            <!--- Test Case information
              #@TestMarker          Backend Import Tasks Tests
              #@TestName            Backend: Import Tasks: Rejects File
              #@TestID              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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Rejects File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
                    'taskID'         : STAXCurrentTestcase,
                    'ldifFile'       : '%s/backends/Example.ldif' % remote.data,
                    'rejectsFile'    : './rejects'
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <!-- Should check there is a rejects file and the contents are correct -->
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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.
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
            <testcase name="getTestCaseName('Overwrite Rejects File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD,
                    'taskID'               : STAXCurrentTestcase,
                    'ldifFile'             : '%s/backends/Example.ldif' % remote.data,
                    'rejectsFile'          : './rejects',
                    'overwriteRejectsFile' : 'TRUE'
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <!-- Should check there is a rejects file and the contents are correct -->
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- 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
              #@TestPreamble
              #@TestSteps
              #@TestPostamble
              #@TestResult
            -->
              <testcase name="getTestCaseName('Skip Schema Validation Accept')">
                <sequence>
                  <call function="'testCase_Preamble'"/>
                  <call function="'importLdifTask'">
                    { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                      'dsInstancePort'       : DIRECTORY_INSTANCE_PORT,
                      'dsInstanceDn'         : DIRECTORY_INSTANCE_DN,
                      'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD,
                      'taskID'               : STAXCurrentTestcase,
                      'ldifFile'             : '%s/backends/Schema.ldif' % remote.data,
                      'skipSchemaValidation' : 'TRUE'
                    }
                  </call>
                  <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult
                    }
                  </call>
                  <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'],
                      'startDS'         : 'no'
                    }
                  </call>
                  <call function="'testCase_Postamble'"/>
                </sequence>
              </testcase>
              <!--- 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 invalided schema is rejected when skip schema validation is not specified
                #@TestPreamble
                #@TestSteps
                #@TestPostamble
                #@TestResult
              -->
            <testcase name="getTestCaseName('Skip Schema Validation Reject')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdifTask'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD,
                    'taskID'               : STAXCurrentTestcase,
                    'ldifFile'             : '%s/backends/Schema.ldif' % remote.data,
                    'skipSchemaValidation' : 'FALSE'
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                </call>
                <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'],
                    'startDS'         : 'no'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
                  #@TestMarker          Backend Import Tasks Tests
                  #@TestName            Backend: Import Tasks: Error Codes
                  #@TestID              Error Codes
                  #@TestPurpose         Verify an import task fails with an error code.
                  #@TestPreamble
                  #@TestSteps
                  #@TestPostamble
                  #@TestResult
            -->
            <!-- Need to know what the error codes are -->
          </sequence>
        <finally>
          <call function="'testCase_Postamble'"/>
        </finally>
          <finally>
            <sequence>
              <!-- Test Suite Cleanup -->
              <message>'Finally: Global Backup Cleanup.'</message>
              <try>
                <try>
                  <call function="'common_cleanup'" />
                <catch exception="'STAFException'">
                  <sequence>
                    <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
                  </sequence>
                </catch>
                </try>
              <finally>
                <call function="'testSuite_Postamble'"/>
              </finally>
              </try>
            </sequence>
          </finally>
        </try>
      </try>
      </block>
    </sequence>
    </testcase>
  </function>
    <!--- Test Case information
    #@TestMarker          Backend Import TasksTests
    #@TestName            Backend: Import Tasks: LDIF Non Default
    #@TestID              LDIF Non Default
    #@TestPurpose         Verify an import task of a LDIF file using a differrent backend to the default.
    #@TestPreamble
    #@TestSteps           ./import-ldif.sh -n "nonDefault" -l ../ldif/Example.ldif
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_tasks_002" scope="local">
    <testcase name="getTestCaseName('LDIF Non Default')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <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>
        </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Include Branch
      #@TestID              Fractional Include Branch
      #@TestPurpose         Verify an import task of a LDIF file specifying a branch that should be included in the import.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_003" scope="local">
    <testcase name="getTestCaseName('Fractional Include Branch')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
              'includeBranches' : ['dc=com'],
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Include Branches
      #@TestID              Fractional Include Branches
      #@TestPurpose         Verify an import task of a LDIF file specifying multiple branches that should be included in the import.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_004" scope="local">
    <testcase name="getTestCaseName('Fractional Include Branches')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
              'includeBranches' : ['dc=com','dc=example,dc=com']
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Exclude Branch
      #@TestID              Fractional Exclude Branch
      #@TestPurpose         Verify an import task of a LDIF file specifying a branch that should be excluded in the import.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_005" scope="local">
    <testcase name="getTestCaseName('Fractional Exclude Branch')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'" />
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
              'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com'],
            }
          </call>
          <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'],
              'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Exclude Branches
      #@TestID              Fractional Exclude Branches
      #@TestPurpose         Verify an import task of a LDIF file specifying multiple branches that should be excluded in the import.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_006" scope="local">
    <testcase name="getTestCaseName('Fractional Exclude Branches')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'" />
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
              'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com',
                                   'cn=QA Managers,ou=groups,dc=example,dc=com']
            }
          </call>
          <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'],
              'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=brammage,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=bbaret,cn=QA Managers,ou=groups,dc=example,dc=com'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Branches Mix
      #@TestID              Fractional Branches Mix
      #@TestPurpose         Verify an import task of a LDIF file specifying a mix of include and exclude branches.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_007" scope="local">
    <testcase name="getTestCaseName('Fractional Branches Mix')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
              'includeBranches' : ['dc=com'],
              'excludeBranches' : ['ou=Departed,ou=People,dc=example,dc=com'],
            }
          </call>
          <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'],
              'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Include Attribute
      #@TestID              Fractional Include Attribute
      #@TestPurpose         Verify an import task of a LDIF file specifying an attribute that should be included in the import.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_008" scope="local">
    <testcase name="getTestCaseName('Fractional Include Attribute')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'" />
          <call function="'importLdifTask'">
            { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
              'taskID'            : STAXCurrentTestcase,
              'ldifFile'          : '%s/backends/Include.ldif' % remote.data,
              'includeAttributes' : ['dc'],
            }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries' : ['dc=com','dc=example,dc=com'],
              'missingEntries'  : ['ou=People,dc=example,dc=com'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Include Attributes
      #@TestID              Fractional Include Attributes
      #@TestPurpose         Verify an import task of a LDIF file specifying multiple attributes that should be included in the import.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_009" scope="local">
    <testcase name="getTestCaseName('Fractional Include Attributes')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'" />
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
              'includeAttributes' : ['dc','cn','ou','sn']
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Exclude Attribute
      #@TestID              Fractional Exclude Attribute
      #@TestPurpose         Verify an import task of a LDIF file specifying an attribute that should be excluded in the import.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_010" scope="local">
    <testcase name="getTestCaseName('Fractional Exclude Attribute')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'" />
          <call function="'importLdifTask'">
            { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
              'taskID'            : STAXCurrentTestcase,
              'ldifFile'          : '%s/backends/Exclude.ldif' % remote.data,
              'excludeAttributes' : ['userpassword']
            }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
              'missingAttributes' : ['userpassword'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Exclude Attributes
      #@TestID              Fractional Exclude Attributes
      #@TestPurpose         Verify an import task of a LDIF file specifying multiple attribute that should be excluded in the import.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_011" scope="local">
    <testcase name="getTestCaseName('Fractional Exclude Attributes')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'" />
          <call function="'importLdifTask'">
            { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
              'taskID'            : STAXCurrentTestcase,
              'ldifFile'          : '%s/backends/Exclude.ldif' % remote.data,
              'excludeAttributes' : ['userpassword','mail','roomnumber']
            }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
              'missingAttributes' : ['userpassword','mail','roomnumber'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Fractional Mix
      #@TestID              Fractional Mix
      #@TestPurpose         Verify an import task of a LDIF file specifying a mix of fractional attributes and branches.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_012" scope="local">
    <testcase name="getTestCaseName('Fractional Mix')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'" />
          <call function="'importLdifTask'">
            { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
              'taskID'            : STAXCurrentTestcase,
              'ldifFile'          : '%s/backends/Exclude.ldif' % remote.data,
              'includeBranches'   : ['dc=com','dc=example,dc=com','ou=People,dc=example,dc=com'],
              'excludeBranches'   : ['ou=Departed,ou=People,dc=example,dc=com'],
              'includeAttributes' : ['dc','cn','ou','sn'],
            }
          </call>
          <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'],
              'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=brammage,ou=Departed,ou=People,dc=example,dc=com'],
              'startDS'         : 'no'
            }
          </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 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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_013" scope="local">
    <testcase name="getTestCaseName('Filtered Include')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'" />
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
              'includeFilters'  : ['objectclass=*'],
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_014" scope="local">
    <testcase name="getTestCaseName('Filtered Exclude')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
              'excludeFilters'  : ['objectclass=person'],
            }
          </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'],
              'startDS'         : 'no'
            }
          </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 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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_015" scope="local">
    <testcase name="getTestCaseName('Filtered Includes')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
              'includeFilters'  : ['objectclass=domain*','objectclass=organizationalunit']
            }
          </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'],
              'startDS'         : 'no'
            }
          </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 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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_016" scope="local">
    <testcase name="getTestCaseName('Filtered Excludes')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
              'excludeFilters'  : ['objectclass=person','objectclass=organizationalunit'],
            }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries' : ['dc=example,dc=com'],
              'missingEntries'  : ['ou=People,dc=example,dc=com'],
              'startDS'         : 'no'
            }
          </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 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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_017" scope="local">
    <testcase name="getTestCaseName('Filtered Includes Complex')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Include.ldif' % remote.data,
              'includeFilters'  : ['|(objectclass=person)(objectclass=domain)(objectclass=organizationalunit)'],
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_018" scope="local">
    <testcase name="getTestCaseName('Filtered Excludes Complex')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Exclude.ldif' % remote.data,
              'excludeFilters'  : ['&amp;(objectclass=person)(ou=Departed)'],
            }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries' : ['uid=rhunt,ou=People,dc=example,dc=com'],
              'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com'],
              'startDS'         : 'no'
            }
          </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 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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_019" scope="local">
    <testcase name="getTestCaseName('Fractional Filtered Mix')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'    : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'    : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
              'taskID'            : STAXCurrentTestcase,
              'ldifFile'          : '%s/backends/Exclude.ldif' % remote.data,
              'excludeFilters'    : ['&amp;(objectclass=person)(ou=Departed)'],
              'includeBranches'   : ['dc=com'],
              'excludeAttributes' : ['userpassword']
            }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
              'missingAttributes' : ['userpassword'],
              'startDS'           : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Append
      #@TestID              Append
      #@TestPurpose         Verify an import task of a LDIF file specifying that the import process should append to the existing database.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_020" scope="local">
    <testcase name="getTestCaseName('Append')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
              'taskID'         : STAXCurrentTestcase,
              'ldifFile'       : '%s/backends/Append.ldif' % remote.data,
              'append'         : 'TRUE'
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_021" scope="local">
    <testcase name="getTestCaseName('Append Replace Existing')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'  : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'  : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'    : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'  : DIRECTORY_INSTANCE_PSWD,
              'taskID'          : STAXCurrentTestcase,
              'ldifFile'        : '%s/backends/Append.ldif' % remote.data,
              'append'          : 'TRUE',
              'replaceExisting' : 'TRUE'
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Compressed
      #@TestID              Compressed
      #@TestPurpose         Verify an import task of a LDIF file specifying the data to import is compressed.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_022" scope="local">
    <testcase name="getTestCaseName('Compressed')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
              'taskID'         : STAXCurrentTestcase,
              'ldifFile'       : '%s/backends/Example.ldif.gz' % remote.data,
              'isCompressed'   : 'TRUE'
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Encrypted
      #@TestID              Encrypted
      #@TestPurpose         Verify an import task of a LDIF file specifying the data to import is encrypted.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_023" scope="local">
    <testcase name="getTestCaseName('Encrypted')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
              'taskID'         : STAXCurrentTestcase,
              'ldifFile'       : '%s/backends/Example.ldif' % remote.data,
              'isEncrypted'    : 'TRUE'
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </call>
          <call function="'checktestRC'">
            { 'returncode' : 1 ,
              'expected'   : 0 ,
              'result'     : 'Encrypted 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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Hashed Signed
      #@TestID              Hashed Signed
      #@TestPurpose         Verify an import task of a LDIF file specifying the data to import is hashed/signed.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_024" scope="local">
    <testcase name="getTestCaseName('Signed Hash')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
              'taskID'         : STAXCurrentTestcase,
              'ldifFile'       : '%s/backends/Example.ldif' % remote.data,
              'isEncrypted'    : 'TRUE'
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </call>
          <call function="'checktestRC'">
            { 'returncode' : 1 ,
              'expected'   : 0 ,
              'result'     : 'Signed Hash import 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 Import Tasks Tests
      #@TestName            Backend: Import Tasks: Rejects File
      #@TestID              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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_025" scope="local">
    <testcase name="getTestCaseName('Rejects File')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
              'taskID'         : STAXCurrentTestcase,
              'ldifFile'       : '%s/backends/Example.ldif' % remote.data,
              'rejectsFile'    : './rejects'
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </call>
          <!-- Should check there is a rejects file and the contents are correct -->
        </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 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.
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_026" scope="local">
    <testcase name="getTestCaseName('Overwrite Rejects File')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'       : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'         : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD,
              'taskID'               : STAXCurrentTestcase,
              'ldifFile'             : '%s/backends/Example.ldif' % remote.data,
              'rejectsFile'          : './rejects',
              'overwriteRejectsFile' : 'TRUE'
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </call>
          <!-- Should check there is a rejects file and the contents are correct -->
        </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 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
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_027" scope="local">
    <testcase name="getTestCaseName('Skip Schema Validation Accept')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'       : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'         : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD,
              'taskID'               : STAXCurrentTestcase,
              'ldifFile'             : '%s/backends/Schema.ldif' % remote.data,
              'skipSchemaValidation' : 'TRUE'
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 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
      #@TestPreamble
      #@TestSteps
      #@TestPostamble
      #@TestResult
    -->
  <function name="backends_import_tasks_028" scope="local">
    <testcase name="getTestCaseName('Skip Schema Validation Reject')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'importLdifTask'">
            { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
              'dsInstancePort'       : DIRECTORY_INSTANCE_PORT,
              'dsInstanceDn'         : DIRECTORY_INSTANCE_DN,
              'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD,
              'taskID'               : STAXCurrentTestcase,
              'ldifFile'             : '%s/backends/Schema.ldif' % remote.data,
              'skipSchemaValidation' : 'FALSE'
            }
          </call>
          <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'],
              'startDS'         : 'no'
            }
          </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 Import Tasks Tests
          #@TestName            Backend: Import Tasks: Error Codes
          #@TestID              Error Codes
          #@TestPurpose         Verify an import task fails with an error code.
          #@TestPreamble
          #@TestSteps
          #@TestPostamble
          #@TestResult
    -->
    <!-- Need to know what the error codes are -->
</stax>
opends/tests/staf-tests/functional-tests/testcases/backends/import/import_tests.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../../shared/stax.dtd">
<!DOCTYPE stax SYSTEM "../../../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
@@ -23,1314 +23,1596 @@
 !
 ! CDDL HEADER END
 !
 !      Copyright 2006-2009 Sun Microsystems, Inc.
 !      Copyright 2009 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_import"/>
  <!--- Test Case information
  #@TestMarker          Backend Import Tests
  #@TestName            Backend: Import: LDIF Default
  #@TestID              LDIF Default
  #@TestPurpose         Verify an import of a LDIF file using the default backend.
  #@TestPreamble
  #@TestSteps           ./import-ldif.sh -l ../ldif/Example.ldif -n "userRoot"
  #@TestPostamble
  #@TestResult
  -->
  <function name="main_import">
  <function name="backends_import_001" scope="local">
    <sequence>
    <testcase name="getTestCaseName('LDIF Default')">
      <block name="'import'">
      <try>
        <try>
        <sequence>
          <sequence>
            <script>
              if not CurrentTestPath.has_key('group'):
                CurrentTestPath['group']='backends'
              CurrentTestPath['suite']=STAXCurrentBlock
            </script>
            <call function="'testSuite_Preamble'"/>
            <!--- Test Suite information
            #@TestSuiteName       Backend Import Tests
            #@TestSuitePurpose    Verify that the basic import functionality is working in the Directory Server.
            #@TestSuiteID         Import Tests
            #@TestSuiteGroup      Import
            #@TestGroup           Backend
            #@TestScript          import.xml
            #@TestHTMLLink        http://opends.dev.java.net/
            -->
            <call function="'common_setup'">
              {
                'quickStart'  : False ,
                'startServer' : False ,
                'loadData'    : False ,
                'stopServer'  : False
              }
            </call>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: LDIF Default
            #@TestID              LDIF Default
            #@TestPurpose         Verify an import of a LDIF file using the default backend.
            #@TestPreamble
            #@TestSteps           ./import-ldif.sh -l ../ldif/Example.ldif -n "userRoot"
            #@TestPostamble
            #@TestResult
            -->
          <call function="'testCase_Preamble'"/>
              
            <testcase name="getTestCaseName('LDIF Default')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                  { 'location'    : STAF_REMOTE_HOSTNAME ,
                    'dsLdifFile'  : '%s/backends/Example.ldif' % remote.data,
                    'dsBackEnd'   : DIRECTORY_INSTANCE_BE
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: LDIF Non Default
            #@TestID              LDIF Non Default
            #@TestPurpose         Verify an import of a LDIF file using a differrent backend to the default.
            #@TestPreamble
            #@TestSteps           ./import-ldif.sh -n "nonDefault" -l ../ldif/Example.ldif
            #@TestPostamble
            #@TestResult
            -->
            <!--  Not clear how to create a second backend
            <testcase name="getTestCaseName('LDIF Non Default')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'importLdif'">
                  { 'ldifFile'    : '%s/backends/Example.ldif' % remote.data,
                    'backEnd'     : 'nonDefault' }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
      -->
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Include Branch
            #@TestID              Fractional Include Branch
            #@TestPurpose         Verify an import of a LDIF file specifying a branch that should be included in the import.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Include Branch')">
              <sequence>
                <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
            { 'dsLdifFile'  : '%s/backends/Example.ldif' % remote.data,
              'dsBackEnd'   : DIRECTORY_INSTANCE_BE
            }
          </call>
  
                <call function="'ImportLdifWithScript'">
                  { 'location'        : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'      : '%s/backends/Include.ldif' % remote.data,
                    'dsIncludeBranch' : ['dc=com'] }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Include Branch with backend ID
            #@TestID              Fractional Include Branch
            #@TestPurpose         Verify an import of a LDIF file specifying a branch that should be included in the import
                                  along with the backendID.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Include Branch with backend ID')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                  { 'location'        : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'      : '%s/backends/Include.ldif' % remote.data,
                    'dsIncludeBranch' : ['dc=com'],
                    'dsBackEnd'       : DIRECTORY_INSTANCE_BE
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Include Branches
            #@TestID              Fractional Include Branches
            #@TestPurpose         Verify an import of a LDIF file specifying multiple branches that should be included in the import.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Include Branches')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                  { 'location'        : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'      : '%s/backends/Include.ldif' % remote.data,
                    'dsIncludeBranch' : ['dc=com','dc=example,dc=com']
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Exclude Branch
            #@TestID              Fractional Exclude Branch
            #@TestPurpose         Verify an import of a LDIF file specifying a branch that should be excluded in the import.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Exclude Branch')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                  { 'location'        : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'      : '%s/backends/Exclude.ldif' % remote.data,
                    'dsExcludeBranch' : ['ou=Departed,ou=People,dc=example,dc=com'],
                    'dsBackEnd'       : DIRECTORY_INSTANCE_BE
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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'] ,
                     'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                         'uid=brammage,ou=Departed,ou=People,dc=example,dc=com']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Exclude Branches
            #@TestID              Fractional Exclude Branches
            #@TestPurpose         Verify an import of a LDIF file specifying multiple branches that should be excluded in the import.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Exclude Branches')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                  { 'location'        : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'      : '%s/backends/Exclude.ldif' % remote.data,
                    'dsExcludeBranch' : ['ou=Departed,ou=People,dc=example,dc=com'],
                    'dsBackEnd'       : DIRECTORY_INSTANCE_BE
                  }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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'] ,
                     'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                         'uid=brammage,ou=Departed,ou=People,dc=example,dc=com']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Branches Mix
            #@TestID              Fractional Branches Mix
            #@TestPurpose         Verify an import of a LDIF file specifying a mix of include and exclude branches.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Branches Mix')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'        : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'      : '%s/backends/Exclude.ldif' % remote.data,
                    'dsIncludeBranch' : ['dc=com'],
                    'dsExcludeBranch' : ['ou=Departed,ou=People,dc=example,dc=com']
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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'] ,
                     'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                         'uid=brammage,ou=Departed,ou=People,dc=example,dc=com']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Include Attribute
            #@TestID              Fractional Include Attribute
            #@TestPurpose         Verify an import of a LDIF file specifying an attribute that should be included in the import.
            #@TestPreamble
            #@TestSteps           ./import-ldif.sh -n "userRoot" -i dc -l Include.ldif
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Include Attribute')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
                    'dsIncludeAttribute' : ['dc'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries' : ['dc=com','dc=example,dc=com'],
                    'missingEntries'  : ['ou=People,dc=example,dc=com']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Include Attributes
            #@TestID              Fractional Include Attributes
            #@TestPurpose         Verify an import of a LDIF file specifying multiple attributes that should be included in the import.
            #@TestPreamble
            #@TestSteps           ./import-ldif.sh -n "userRoot" -i cn -i dc -i ou -i sn -l Include.ldif
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Include Attributes')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
                    'dsIncludeAttribute' : ['dc','cn','ou','sn'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Exclude Attribute
            #@TestID              Fractional Exclude Attribute
            #@TestPurpose         Verify an import of a LDIF file specifying an attribute that should be excluded in the import.
            #@TestPreamble
            #@TestSteps           ./import-ldif.sh -n "userRoot" -e userpassword -l Example.ldif
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Exclude Attribute')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
                    'dsExcludeAttribute' : ['userpassword'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
                    'missingAttributes' : ['userpassword']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Exclude Attributes
            #@TestID              Fractional Exclude Attributes
            #@TestPurpose         Verify an import of a LDIF file specifying multiple attribute that should be excluded in the import.
            #@TestPreamble
            #@TestSteps           ./import-ldif.sh -n "userRoot" -e userpassword -e mail -e roomnumber -l Example.ldif
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Exclude Attributes')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
                    'dsExcludeAttribute' : ['userpassword','mail','roomnumber'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
                    'missingAttributes' : ['userpassword']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Mix
            #@TestID              Fractional Mix
            #@TestPurpose         Verify an import of a LDIF file specifying a mix of fractional attributes and branches.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Mix')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Example.ldif' % remote.data,
                    'dsIncludeAttribute' : ['dc','cn','ou','sn'],
                    'dsIncludeBranch'    : ['dc=com','dc=example,dc=com','ou=People,dc=example,dc=com'],
                    'dsExcludeBranch'    : ['ou=Departed,ou=People,dc=example,dc=com']
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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'],
                    'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                         'uid=brammage,ou=Departed,ou=People,dc=example,dc=com']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Filtered Include
            #@TestID              Filtered Include
            #@TestPurpose         Verify an import of a LDIF file specifying a search filter control which entries are included in the import.
            #@TestPreamble
            #@TestSteps           ./import-ldif.sh -n "userRoot" -I "objectclass=*" -l Include.ldif
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Include')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
                    'dsIncludeFilter'    : ['objectclass=*'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Filtered Exclude
            #@TestID              Filtered Exclude
            #@TestPurpose         Verify an import of a LDIF file specifying a search filter control which entries are excluded in the import.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Exclude')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
                    'dsExcludeFilter'    : ['objectclass=person'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </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']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Filtered Includes
            #@TestID              Filtered Includes
            #@TestPurpose         Verify an import of a LDIF file specifying multiple search filters control which entries are included in the import.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Includes')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
                    'dsIncludeFilter'    : ['objectclass=domain','objectclass=organizationalunit'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </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']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Filtered Excludes
            #@TestID              Filtered Excludes
            #@TestPurpose         Verify an import of a LDIF file specifying multiple search filters control which entries are excluded in the import.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Excludes')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
                    'dsExcludeFilter'    : ['objectclass=person','objectclass=organizationalunit'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries' : ['dc=example,dc=com'],
                    'missingEntries'  : ['ou=People,dc=example,dc=com']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Filtered Includes Complex
            #@TestID              Filtered Includes Complex
            #@TestPurpose         Verify an import of a LDIF file specifying complex search filters control which entries are included in the import.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Includes Complex')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
                    'dsIncludeFilter'    : ['|(objectclass=person)(objectclass=domain)(objectclass=organizationalunit)'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Filtered Excludes Complex
            #@TestID              Filtered Excludes Complex
            #@TestPurpose         Verify an import of a LDIF file specifying complex search filters control which entries are excluded in the import.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Filtered Excludes Complex')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
                    'dsExcludeFilter'    : ['&amp;(objectclass=person)(ou=Departed)'],
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries' : ['uid=rhunt,ou=People,dc=example,dc=com'],
                    'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Fractional Filtered Mix
            #@TestID              Fractional Filtered Mix
            #@TestPurpose         Verify an import of a LDIF file specifying a mix of fractional and filtered.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Fractional Filtered Mix')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
                    'dsExcludeFilter'    : ['&amp;(objectclass=person)(ou=Departed)'],
                    'dsIncludeBranch'    : ['dc=com'],
                    'dsExcludeAttribute' : ['userpassword']
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <call function="'checkImport'">
                  { 'expectedEntries' : ['uid=rhunt,ou=People,dc=example,dc=com'],
                    'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Append
            #@TestID              Append
            #@TestPurpose         Verify an import of a LDIF file specifying that the import process should append to the existing database.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Append')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Append.ldif' % remote.data,
                    'dsAppend'           : 'TRUE',
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Append Replace Existing
            #@TestID              Append Replace Existing
            #@TestPurpose         Verify an import of a LDIF file specifying that an existing entry should be replaced when appending to an existing database.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Append Replace Existing')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Append.ldif' % remote.data,
                    'dsAppend'           : 'TRUE',
                    'dsReplaceExisting'  : 'TRUE',
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Compressed
            #@TestID              Compressed
            #@TestPurpose         Verify an import of a LDIF file specifying the data to import is compressed.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Compressed')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Example.ldif.gz' % remote.data,
                    'dsIsCompressed'     : 'TRUE',
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Encrypted
            #@TestID              Encrypted
            #@TestPurpose         Verify an import of a LDIF file specifying the data to import is encrypted.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Encrypted')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Example.ldif' % remote.data,
                    'dsIsEncrypted'      : 'TRUE',
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <!-- Known issue -->
                <call function="'checktestRC'">
                  { 'returncode' : 1 ,
                    'expected'   : 0 ,
                    'result'     : 'Encrypted LDIF export is not implemented',
                    'issue'      : '839'
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Hashed Signed
            #@TestID              Hashed Signed
            #@TestPurpose         Verify an import of a LDIF file specifying the data to import is hashed/signed.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <!-- Test Not Implemented. Feature not avaliable -->
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Rejects File
            #@TestID              Rejects File
            #@TestPurpose         Verify an import 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.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Rejects File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Example.ldif' % remote.data,
                    'dsRejectFile'       : '%s/rejects.txt' % remote.temp,
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Rejects File Overwrite
            #@TestID              Rejects File Overwrite
            #@TestPurpose         Verify an import 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.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Rejects File Overwrite')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Example.ldif' % remote.data,
                    'dsRejectFile'       : '%s/rejects.txt' % remote.temp,
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Skip Schema Validation Accept
            #@TestID              Skip Schema Validation Accept
            #@TestPurpose         Verify an import of a LDIF file containing invalided schema is accepted when skip schema validation is specified
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Skip Schema Validation Accept')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'             : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'             : '%s/backends/Schema.ldif' % remote.data,
                    'dsSkipSchemaValidation' : 'TRUE',
                    'dsBackEnd'              : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Skip Schema Validation Reject
            #@TestID              skip schema validation reject
            #@TestPurpose         Verify an import of a LDIF file containing invalided schema is rejected when skip schema validation is not specified
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <testcase name="getTestCaseName('Skip Schema Validation Reject')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <call function="'ImportLdifWithScript'">
                    { 'location'         : STAF_REMOTE_HOSTNAME,
                    'dsLdifFile'         : '%s/backends/Schema.ldif' % remote.data,
                    'dsBackEnd'          : DIRECTORY_INSTANCE_BE
                    }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <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']
                  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!--- Test Case information
            #@TestMarker          Backend Import Tests
            #@TestName            Backend: Import: Error Codes
            #@TestID              Error Codes
            #@TestPurpose         Verify an import fails with an error code.
            #@TestPreamble
            #@TestSteps
            #@TestPostamble
            #@TestResult
            -->
            <!-- Need to know what the error codes are -->
          </sequence>
          <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>
          <finally>
            <sequence>
              <!-- Test Suite Cleanup -->
              <message>'Finally: Global Backup Cleanup.'</message>
              <try>
                <try>
                  <call function="'common_cleanup'" />
                <catch exception="'STAFException'">
                  <sequence>
                    <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
                  </sequence>
                </catch>
                </try>
              <finally>
                <call function="'testSuite_Postamble'"/>
              </finally>
              </try>
            </sequence>
          </finally>
        </try>
      </block>
    </sequence>
        </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 Import Tests
    #@TestName            Backend: Import: LDIF Non Default
    #@TestID              LDIF Non Default
    #@TestPurpose         Verify an import of a LDIF file using a differrent backend to the default.
    #@TestPreamble
    #@TestSteps           ./import-ldif.sh -n "nonDefault" -l ../ldif/Example.ldif
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_002" scope="local">
    <testcase name="getTestCaseName('LDIF Non Default')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <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="'StopDsWithScript'"/>
          <call function="'ImportLdifWithScript'">
            { 'dsLdifFile'  : '%s/backends/nonDefault.ldif' % remote.data,
              'dsBackEnd'   : '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'] }
          </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 Import Tests
    #@TestName            Backend: Import: Fractional Include Branch
    #@TestID              Fractional Include Branch
    #@TestPurpose         Verify an import of a LDIF file specifying a branch that should be included in the import.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
            -->
  <function name="backends_import_003" scope="local">
    <testcase name="getTestCaseName('Fractional Include Branch')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
            { 'dsLdifFile'      : '%s/backends/Include.ldif' % remote.data,
              'dsIncludeBranch' : ['dc=com'] }
          </call>
          <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>
        </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 Import Tests
    #@TestName            Backend: Import: Fractional Include Branch with backend ID
    #@TestID              Fractional Include Branch
    #@TestPurpose         Verify an import of a LDIF file specifying a branch that should be included in the import
                          along with the backendID.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_004" scope="local">
    <testcase name="getTestCaseName('Fractional Include Branch with backend ID')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
            { 'location'        : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'      : '%s/backends/Include.ldif' % remote.data,
              'dsIncludeBranch' : ['dc=com'],
              'dsBackEnd'       : DIRECTORY_INSTANCE_BE
            }
          </call>
          <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>
        </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 Import Tests
    #@TestName            Backend: Import: Fractional Include Branches
    #@TestID              Fractional Include Branches
    #@TestPurpose         Verify an import of a LDIF file specifying multiple branches that should be included in the import.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_005" scope="local">
    <testcase name="getTestCaseName('Fractional Include Branches')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
            { 'location'        : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'      : '%s/backends/Include.ldif' % remote.data,
              'dsIncludeBranch' : ['dc=com','dc=example,dc=com']
            }
          </call>
          <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>
        </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 Import Tests
    #@TestName            Backend: Import: Fractional Exclude Branch
    #@TestID              Fractional Exclude Branch
    #@TestPurpose         Verify an import of a LDIF file specifying a branch that should be excluded in the import.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_006" scope="local">
    <testcase name="getTestCaseName('Fractional Exclude Branch')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
            { 'location'        : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'      : '%s/backends/Exclude.ldif' % remote.data,
              'dsExcludeBranch' : ['ou=Departed,ou=People,dc=example,dc=com'],
              'dsBackEnd'       : DIRECTORY_INSTANCE_BE
            }
          </call>
          <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'] ,
               'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=brammage,ou=Departed,ou=People,dc=example,dc=com']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Fractional Exclude Branches
    #@TestID              Fractional Exclude Branches
    #@TestPurpose         Verify an import of a LDIF file specifying multiple branches that should be excluded in the import.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_007" scope="local">
      <testcase name="getTestCaseName('Fractional Exclude Branches')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
            { 'location'        : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'      : '%s/backends/Exclude.ldif' % remote.data,
              'dsExcludeBranch' : ['ou=Departed,ou=People,dc=example,dc=com', 'ou=unit1, ou=People, dc=example,dc=com'],
              'dsBackEnd'       : DIRECTORY_INSTANCE_BE
            }
          </call>
          <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'] ,
               'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=brammage,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=arammell, ou=unit1, ou=People, dc=example,dc=com']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Fractional Branches Mix
    #@TestID              Fractional Branches Mix
    #@TestPurpose         Verify an import of a LDIF file specifying a mix of include and exclude branches.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_008" scope="local">
    <testcase name="getTestCaseName('Fractional Branches Mix')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'        : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'      : '%s/backends/Exclude.ldif' % remote.data,
              'dsIncludeBranch' : ['dc=com'],
              'dsExcludeBranch' : ['ou=Departed,ou=People,dc=example,dc=com']
              }
          </call>
          <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'] ,
               'missingEntries' : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=brammage,ou=Departed,ou=People,dc=example,dc=com']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Fractional Include Attribute
    #@TestID              Fractional Include Attribute
    #@TestPurpose         Verify an import of a LDIF file specifying an attribute that should be included in the import.
    #@TestPreamble
    #@TestSteps           ./import-ldif.sh -n "userRoot" -i dc -l Include.ldif
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_009" scope="local">
    <testcase name="getTestCaseName('Fractional Include Attribute')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
              'dsIncludeAttribute' : ['dc'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries' : ['dc=com','dc=example,dc=com'],
              'missingEntries'  : ['ou=People,dc=example,dc=com']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Fractional Include Attributes
    #@TestID              Fractional Include Attributes
    #@TestPurpose         Verify an import of a LDIF file specifying multiple attributes that should be included in the import.
    #@TestPreamble
    #@TestSteps           ./import-ldif.sh -n "userRoot" -i cn -i dc -i ou -i sn -l Include.ldif
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_010" scope="local">
   <testcase name="getTestCaseName('Fractional Include Attributes')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
              'dsIncludeAttribute' : ['dc','cn','ou','sn'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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>
        </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 Import Tests
    #@TestName            Backend: Import: Fractional Exclude Attribute
    #@TestID              Fractional Exclude Attribute
    #@TestPurpose         Verify an import of a LDIF file specifying an attribute that should be excluded in the import.
    #@TestPreamble
    #@TestSteps           ./import-ldif.sh -n "userRoot" -e userpassword -l Example.ldif
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_011" scope="local">
    <testcase name="getTestCaseName('Fractional Exclude Attribute')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
              'dsExcludeAttribute' : ['userpassword'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
              'missingAttributes' : ['userpassword']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Fractional Exclude Attributes
    #@TestID              Fractional Exclude Attributes
    #@TestPurpose         Verify an import of a LDIF file specifying multiple attribute that should be excluded in the import.
    #@TestPreamble
    #@TestSteps           ./import-ldif.sh -n "userRoot" -e userpassword -e mail -e roomnumber -l Example.ldif
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_012" scope="local">
    <testcase name="getTestCaseName('Fractional Exclude Attributes')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
              'dsExcludeAttribute' : ['userpassword','mail','roomnumber'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries'   : ['uid=scarter,ou=People,dc=example,dc=com'],
              'missingAttributes' : ['userpassword']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Fractional Mix
    #@TestID              Fractional Mix
    #@TestPurpose         Verify an import of a LDIF file specifying a mix of fractional attributes and branches.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
   <function name="backends_import_013" scope="local">
    <testcase name="getTestCaseName('Fractional Mix')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Example.ldif' % remote.data,
              'dsIncludeAttribute' : ['dc','cn','ou','sn'],
              'dsIncludeBranch'    : ['dc=com','dc=example,dc=com','ou=People,dc=example,dc=com'],
              'dsExcludeBranch'    : ['ou=Departed,ou=People,dc=example,dc=com']
              }
          </call>
          <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'],
              'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com',
                                   'uid=brammage,ou=Departed,ou=People,dc=example,dc=com']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Filtered Include
    #@TestID              Filtered Include
    #@TestPurpose         Verify an import of a LDIF file specifying a search filter control which entries are included in the import.
    #@TestPreamble
    #@TestSteps           ./import-ldif.sh -n "userRoot" -I "objectclass=*" -l Include.ldif
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_014" scope="local">
    <testcase name="getTestCaseName('Filtered Include')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
              'dsIncludeFilter'    : ['objectclass=*'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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>
        </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 Import Tests
    #@TestName            Backend: Import: Filtered Exclude
    #@TestID              Filtered Exclude
    #@TestPurpose         Verify an import of a LDIF file specifying a search filter control which entries are excluded in the import.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
            -->
  <function name="backends_import_015" scope="local">
    <testcase name="getTestCaseName('Filtered Exclude')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
              'dsExcludeFilter'    : ['objectclass=person'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </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']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Filtered Includes
    #@TestID              Filtered Includes
    #@TestPurpose         Verify an import of a LDIF file specifying multiple search filters control which entries are included in the import.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_016" scope="local">
    <testcase name="getTestCaseName('Filtered Includes')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
              'dsIncludeFilter'    : ['objectclass=domain','objectclass=organizationalunit'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </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']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Filtered Excludes
    #@TestID              Filtered Excludes
    #@TestPurpose         Verify an import of a LDIF file specifying multiple search filters control which entries are excluded in the import.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_017" scope="local">
    <testcase name="getTestCaseName('Filtered Excludes')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
              'dsExcludeFilter'    : ['objectclass=person','objectclass=organizationalunit'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries' : ['dc=example,dc=com'],
              'missingEntries'  : ['ou=People,dc=example,dc=com']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Filtered Includes Complex
    #@TestID              Filtered Includes Complex
    #@TestPurpose         Verify an import of a LDIF file specifying complex search filters control which entries are included in the import.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_018" scope="local">
    <testcase name="getTestCaseName('Filtered Includes Complex')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Include.ldif' % remote.data,
              'dsIncludeFilter'    : ['|(objectclass=person)(objectclass=domain)(objectclass=organizationalunit)'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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>
        </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 Import Tests
    #@TestName            Backend: Import: Filtered Excludes Complex
    #@TestID              Filtered Excludes Complex
    #@TestPurpose         Verify an import of a LDIF file specifying complex search filters control which entries are excluded in the import.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_019" scope="local">
    <testcase name="getTestCaseName('Filtered Excludes Complex')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
              'dsExcludeFilter'    : ['&amp;(objectclass=person)(ou=Departed)'],
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries' : ['uid=rhunt,ou=People,dc=example,dc=com'],
              'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Fractional Filtered Mix
    #@TestID              Fractional Filtered Mix
    #@TestPurpose         Verify an import of a LDIF file specifying a mix of fractional and filtered.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_020" scope="local">
    <testcase name="getTestCaseName('Fractional Filtered Mix')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Exclude.ldif' % remote.data,
              'dsExcludeFilter'    : ['&amp;(objectclass=person)(ou=Departed)'],
              'dsIncludeBranch'    : ['dc=com'],
              'dsExcludeAttribute' : ['userpassword']
              }
          </call>
          <call function="'checkImport'">
            { 'expectedEntries' : ['uid=rhunt,ou=People,dc=example,dc=com'],
              'missingEntries'  : ['uid=fvinker,ou=Departed,ou=People,dc=example,dc=com']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Append
    #@TestID              Append
    #@TestPurpose         Verify an import of a LDIF file specifying that the import process should append to the existing database.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_021" scope="local">
    <testcase name="getTestCaseName('Append')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Append.ldif' % remote.data,
              'dsAppend'           : 'TRUE',
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Append Replace Existing
    #@TestID              Append Replace Existing
    #@TestPurpose         Verify an import of a LDIF file specifying that an existing entry should be replaced when appending to an existing database.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_022" scope="local">
    <testcase name="getTestCaseName('Append Replace Existing')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Append.ldif' % remote.data,
              'dsAppend'           : 'TRUE',
              'dsReplaceExisting'  : 'TRUE',
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Compressed
    #@TestID              Compressed
    #@TestPurpose         Verify an import of a LDIF file specifying the data to import is compressed.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_023" scope="local">
    <testcase name="getTestCaseName('Compressed')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Example.ldif.gz' % remote.data,
              'dsIsCompressed'     : 'TRUE',
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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>
        </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 Import Tests
    #@TestName            Backend: Import: Encrypted
    #@TestID              Encrypted
    #@TestPurpose         Verify an import of a LDIF file specifying the data to import is encrypted.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_024" scope="local">
    <testcase name="getTestCaseName('Encrypted')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Example.ldif' % remote.data,
              'dsIsEncrypted'      : 'TRUE',
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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>
          <!-- Known issue -->
          <call function="'checktestRC'">
            { 'returncode' : 1 ,
              'expected'   : 0 ,
              'result'     : 'Encrypted LDIF import 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 Import Tests
    #@TestName            Backend: Import: Hashed Signed
    #@TestID              Hashed Signed
    #@TestPurpose         Verify an import of a LDIF file specifying the data to import is hashed/signed.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_025" scope="local">
    <testcase name="getTestCaseName('Hash Signed')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Example.ldif' % remote.data,
              'dsIsEncrypted'      : 'TRUE',
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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>
          <!-- Known issue -->
          <call function="'checktestRC'">
            { 'returncode' : 1 ,
              'expected'   : 0 ,
              'result'     : 'Hash Signed LDIF import 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 Not Implemented. Feature not avaliable -->
    <!--- Test Case information
    #@TestMarker          Backend Import Tests
    #@TestName            Backend: Import: Rejects File
    #@TestID              Rejects File
    #@TestPurpose         Verify an import 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.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_026" scope="local">
    <testcase name="getTestCaseName('Rejects File')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Example.ldif' % remote.data,
              'dsRejectFile'       : '%s/rejects.txt' % remote.temp,
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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>
        </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 Import Tests
    #@TestName            Backend: Import: Rejects File Overwrite
    #@TestID              Rejects File Overwrite
    #@TestPurpose         Verify an import 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.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_027" scope="local">
    <testcase name="getTestCaseName('Rejects File Overwrite')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Example.ldif' % remote.data,
              'dsRejectFile'       : '%s/rejects.txt' % remote.temp,
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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>
        </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 Import Tests
    #@TestName            Backend: Import: Skip Schema Validation Accept
    #@TestID              Skip Schema Validation Accept
    #@TestPurpose         Verify an import of a LDIF file containing invalided schema is accepted when skip schema validation is specified
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_028" scope="local">
    <testcase name="getTestCaseName('Skip Schema Validation Accept')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'             : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'             : '%s/backends/Schema.ldif' % remote.data,
              'dsSkipSchemaValidation' : 'TRUE',
              'dsBackEnd'              : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Skip Schema Validation Reject
    #@TestID              skip schema validation reject
    #@TestPurpose         Verify an import of a LDIF file containing invalided schema is rejected when skip schema validation is not specified
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
  <function name="backends_import_029" scope="local">
    <testcase name="getTestCaseName('Skip Schema Validation Reject')">
      <try>
        <sequence>
          <call function="'testCase_Preamble'"/>
          <call function="'ImportLdifWithScript'">
              { 'location'         : STAF_REMOTE_HOSTNAME,
              'dsLdifFile'         : '%s/backends/Schema.ldif' % remote.data,
              'dsBackEnd'          : DIRECTORY_INSTANCE_BE
              }
          </call>
          <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']
            }
          </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 Import Tests
    #@TestName            Backend: Import: Error Codes
    #@TestID              Error Codes
    #@TestPurpose         Verify an import fails with an error code.
    #@TestPreamble
    #@TestSteps
    #@TestPostamble
    #@TestResult
    -->
    <!-- Need to know what the error codes are -->
</stax>