From c6b5f75749702af270d574ed5dbe392b486bc6a9 Mon Sep 17 00:00:00 2001
From: gary_williams <gary_williams@localhost>
Date: Mon, 21 Sep 2009 10:59:33 +0000
Subject: [PATCH] Re-commit functional tests backends import(-tasks)/export(-tasks) improvements
---
opends/tests/staf-tests/functional-tests/testcases/backends/import/import_tests.xml | 2876 ++++++++-------
opends/tests/staf-tests/functional-tests/testcases/backends/export/export_tests.xml | 4151 ++++++++++++-----------
opends/tests/staf-tests/functional-tests/testcases/backends/export-tasks/export-tasks_tests.xml | 694 +--
opends/tests/staf-tests/functional-tests/testcases/backends/import-tasks/import-tasks_tests.xml | 2793 +++++++++------
4 files changed, 5,708 insertions(+), 4,806 deletions(-)
diff --git a/opends/tests/staf-tests/functional-tests/testcases/backends/export-tasks/export-tasks_tests.xml b/opends/tests/staf-tests/functional-tests/testcases/backends/export-tasks/export-tasks_tests.xml
index 6f5b665..b92b68b 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/backends/export-tasks/export-tasks_tests.xml
+++ b/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>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/backends/export/export_tests.xml b/opends/tests/staf-tests/functional-tests/testcases/backends/export/export_tests.xml
index b182197..d22add7 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/backends/export/export_tests.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/backends/export/export_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
!
@@ -14,8 +14,8 @@
! See the License for the specific language governing permissions
! and limitations under the License.
!
- ! When distributing Covered Code, exclude this CDDL HEADER in each
- ! file and exclude the License file at
+ ! When distributing Covered Code, include this CDDL HEADER in each
+ ! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
@@ -23,2042 +23,2129 @@
!
! CDDL HEADER END
!
- ! Copyright 2006-2009 Sun Microsystems, Inc.
+ ! Copyright 2009 Sun Microsystems, Inc.
! -->
<stax>
- <defaultcall function="main_export"/>
- <function name="main_export">
- <sequence>
- <block name="'export'">
- <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: Export Tests
- #@TestSuitePurpose Verify that the export functionality is working in the Directory Server.
- #@TestSuiteID Backend Export Tests
- #@TestSuiteGroup Export
- #@TestGroup Backend
- #@TestScript export.xml
- #@TestHTMLLink http://opends.dev.java.net/
- -->
- <call function="'common_setup'">
- {
- 'quickStart' : False ,
- 'startServer' : False ,
- 'loadData' : False ,
- 'stopServer' : False
- }
- </call>
-
- <!-- Create a second instance to import data that was exported from the first instance -->
- <message>
- 'Creating another instance for verifing the exports'
- </message>
-
- <script>
- DsInstancePort = int(DIRECTORY_INSTANCE_PORT)+1
- DsInstanceAdminPort = int(DIRECTORY_INSTANCE_ADMIN_PORT)+1
- DsInstanceDir = '%s/server2' % DIRECTORY_INSTANCE_DIR
- </script>
-
- <call function="'createInstance'">
- { 'dsHost' : '%s' % DIRECTORY_INSTANCE_HOST,
- 'dsDir' : DsInstanceDir,
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : '%s' % DIRECTORY_INSTANCE_DN,
- 'dsBindPwd' : '%s' % DIRECTORY_INSTANCE_PSWD,
- 'dsBaseDN' : '%s' % DIRECTORY_INSTANCE_SFX
- }
- </call>
-
- <!-- Set the server backup the way it was before the backend tests -->
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/quickstart/quickstart.xml' % (TESTS_DIR)"/>
- <call function="'main_quickstart'" />
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: LDIF Default
- #@TestID LDIF Default
- #@TestPurpose Verify an export of a LDIF file on the default backend.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export default backend')">
- <sequence>
- <call function="'testCase_Preamble'" />
- <message>
- 'Backend: Export: Export default backend'
- </message>
- <call function="'exportLdif'">
- {
- 'ldifFile' : '%s/backends/Export_default.ldif' % remote.data,
- 'backEnd' : '%s' % DIRECTORY_INSTANCE_BE
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_default.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: LDIF Non Default
- #@TestID LDIF Non Default
- #@TestPurpose Verify an export of a LDIF file on a differrent backend to the default.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- non-default backend, and ldifFile
- #@TestPostamble
- #@TestResult Success if Success if exportLDIF, importLDIF returns 0
- -->
- <testcase name="getTestCaseName('Export non-default backend')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export non-default backend'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_schema.ldif' % remote.data,
- 'backEnd' : 'schema'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_schema.ldif' % remote.data,
- 'backEnd' : 'schema',
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'knownIssue' : '2173'
- }
- </call>
+ <!--- Test Case information
+ #@TestMarker Backend Import Tests
+ #@TestName Backend: Import: Create Second Instance
+ #@TestID Create second instance
+ #@TestPurpose Create second instance of OpenDS to verify export
+ #@TestPreamble
+ #@TestSteps
+ #@TestPostamble
+ #@TestResult
+ -->
+
+ <function name="backends_export_001" scope="local">
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Include Branch
- #@TestID Fractional Include Branch
- #@TestPurpose Verify an export of a LDIF file specifying a branch that should be included in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and -b option. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Include Branch')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Include Branch'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_IncludeBranch.ldif' % remote.data,
- 'extraParams' : '-b "dc=com"'
- }
- </call>
+ <testcase name="getTestCaseName('Create Second Instance')">
+ <try>
+ <sequence>
+
+ <call function="'testCase_Preamble'" />
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_IncludeBranch.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
+ <!-- Create a second instance to import data that was exported from the first instance -->
+ <message>
+ 'Creating another instance for verifing the exports'
+ </message>
+
+ <call function="'createInstance'">
+ { 'dsHost' : '%s' % DIRECTORY_INSTANCE_HOST,
+ 'dsDir' : DsInstanceDir,
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'dsBindDN' : '%s' % DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : '%s' % DIRECTORY_INSTANCE_PSWD,
+ 'dsBaseDN' : '%s' % DIRECTORY_INSTANCE_SFX
+ }
+ </call>
+
+ <!-- Start second server -->
+ <call function="'StartDsWithScript'">
+ {'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
+ </call>
+
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <!-- Create a second backend -->
+ <script>
+ options=[]
+ options.append('--backend-name "nonDefault"')
+ options.append('--set base-dn:"dc=non-default,dc=com"')
+ options.append('--set enabled:true')
+ options.append('--set writability-mode:enabled')
+ options.append('-t local-db')
+ createBackendOptions=' '.join(options)
+ </script>
+
+ <call function="'dsconfig'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir,OPENDSNAME),
+ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsInstanceAdminPort' : DsInstanceAdminPort,
+ 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
+ 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
+ 'subcommand' : 'create-backend',
+ 'optionsString' : createBackendOptions
+ }
+ </call>
+
+ <!-- Stop second server -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Include Branches
- #@TestID Fractional Include Branches
- #@TestPurpose Verify an export of a LDIF file specifying multiple branches that should be included in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and two -b options. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Include Branches')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Include Branches'
- </message>
- <call function="'exportLdif'">
- {
- 'ldifFile' : '%s/backends/Export_IncludeBranches.ldif' % remote.data,
- 'extraParams' : '-b "dc=com" -b "dc=example,dc=com"'
- }
- </call>
+ </sequence>
+
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_IncludeBranches.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Exclude Branch
- #@TestID Fractional Exclude Branch
- #@TestPurpose Verify an export of a LDIF file specifying a branch that should be excluded in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and -B option. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Exclude Branch')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Exclude Branch'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_ExcludeBranch.ldif' % remote.data,
- 'extraParams' : '-B "dc=example,dc=com"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_ExcludeBranch.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'missingEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com'],
- 'expectedEntries' : ['dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Exclude Branches
- #@TestID Fractional Exclude Branches
- #@TestPurpose Verify an export of a LDIF file specifying multiple branches that should be excluded in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and two -B options. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Exclude Branches')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Exclude Branches'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_ExcludeBranches.ldif' % remote.data,
- 'extraParams' : '-B "ou=People,dc=example,dc=com" -B "dc=example,dc=com"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_ExcludeBranches.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'missingEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com'],
- 'expectedEntries' : ['dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Branches Mix
- #@TestID Fractional Branches Mix
- #@TestPurpose Verify an export of a LDIF file specifying a mix of include and exclude branches.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, both -b and -B options. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Branches Mix')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Branches Mix'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_MixBranches.ldif' % remote.data,
- 'extraParams' : '-b "dc=com" -B "ou=People,dc=example,dc=com"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_MixBranches.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort}
- </call>
-
- <call function="'checkImport'">
- { 'missingEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com'],
- 'expectedEntries' : ['dc=com','dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'}
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Include Attribute
- #@TestID Fractional Include Attribute
- #@TestPurpose Verify an export of a LDIF file specifying an attribute that should be included in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and -i option. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Include Attribute')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Include Attribute'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_IncludeAttr.ldif' % remote.data,
- 'extraParams' : '-i dc'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_IncludeAttr.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['dc=com','dc=example,dc=com'],
- 'missingEntries' : ['ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Include Attributes
- #@TestID Fractional Include Attributes
- #@TestPurpose Verify an export of a LDIF file specifying multiple attributes that should be included in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and five -i options. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Include Attributes')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Include Attributes'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_IncludeAttrs.ldif' % remote.data,
- 'extraParams' : '-i dc -i cn -i ou -i sn -i uid'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_IncludeAttrs.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'missingAttributes' : ['userpassword'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Exclude Attribute
- #@TestID Fractional Exclude Attribute
- #@TestPurpose Verify an export of a LDIF file specifying an attribute that should be excluded in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and -e option. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Exclude Attribute')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Exclude Attribute'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_ExcludeAttr.ldif' % remote.data,
- 'extraParams' : '-e userpassword'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_ExcludeAttr.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com'],
- 'missingAttributes' : ['userpassword'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Exclude Attributes
- #@TestID Fractional Exclude Attributes
- #@TestPurpose Verify an export of a LDIF file specifying multiple attribute that should be excluded in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and three -e options. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Exclude Attributes')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Exclude Attributes'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_ExcludeAttrs.ldif' % remote.data,
- 'extraParams' : '-e userpassword -e mail -e roomnumber'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_ExcludeAttrs.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'missingAttributes' : ['userpassword','mail','roomnumber'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Mix
- #@TestID Fractional Mix
- #@TestPurpose Verify an export of a LDIF file specifying a mix of fractional attributes and branches.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and mixed -i, -b, and -B options. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Mix')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Mix'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_FractionalMix.ldif' % remote.data,
- 'extraParams' : '-i dc -i cn -i ou -i sn -i uid -b "dc=com" -b "dc=example,dc=com" -b "ou=People,dc=example,dc=com" -B "ou=Departed,ou=People,dc=example,dc=com"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FractionalMix.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'missingAttributes' : ['userpassword'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Filtered Include
- #@TestID Filtered Include
- #@TestPurpose Verify an export of a LDIF file specifying a search filter control which entries are included in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and -I option. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Filtered Include')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Filtered Include'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredInclude.ldif' % remote.data,
- 'extraParams' : '-I "objectclass=*"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredInclude.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Filtered Includes
- #@TestID Filtered Includes
- #@TestPurpose Verify an export of a LDIF file specifying a search filter control which entries are included in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and two -I options. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Filtered Includes')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Filtered Includes'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
- 'extraParams' : '-I "objectclass=domain" -I "objectclass=organizationalunit"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['dc=example,dc=com', 'dc=com'],
- 'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
- 'uid=dmiller,ou=People,dc=example,dc=com',
- 'uid=rhunt,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'}
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Filtered Exclude
- #@TestID Filtered Exclude
- #@TestPurpose Verify an export of a LDIF file specifying search filter control which entries are excluded in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, an ldifFile, and -E option. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Filtered Exclude')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Filtered Exclude'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredExclude.ldif' % remote.data,
- 'extraParams' : '-E "objectclass=person"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredExclude.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['dc=example,dc=com',
- 'ou=People,dc=example,dc=com'],
- 'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
- 'uid=dmiller,ou=People,dc=example,dc=com',
- 'uid=rhunt,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Filtered Excludes
- #@TestID Filtered Excludes
- #@TestPurpose Verify an export of a LDIF file specifying multiple search filters control which entries are excluded in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Filtered Excludes')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Filtered Excludes'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredExcludes.ldif' % remote.data,
- 'extraParams' : '-E "objectclass=person" -E "objectclass=organizationalunit"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredExcludes.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['dc=example,dc=com',
- 'dc=com'],
- 'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
- 'uid=dmiller,ou=People,dc=example,dc=com',
- 'uid=rhunt,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Filtered Includes
- #@TestID Filtered Includes
- #@TestPurpose Verify an export of a LDIF file specifying multiple search filters control which entries are included in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Filtered Includes')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Filtered Includes'
- </message>
- <call function="'exportLdif'">
- {
- 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
- 'extraParams' : '-I "objectclass=domain" -I "objectclass=organizationalunit"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort}
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['dc=example,dc=com',
- 'ou=People,dc=example,dc=com'],
- 'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
- 'uid=dmiller,ou=People,dc=example,dc=com',
- 'uid=rhunt,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'}
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd}
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Filtered Includes Complex
- #@TestID Filtered Includes Complex
- #@TestPurpose Verify an export of a LDIF file specifying complex search filters control which entries are included in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Filtered Includes Complex')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Filtered Includes Complex'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredComplexIncludes.ldif' % remote.data,
- 'extraParams' : '-I "|(objectclass=person)(objectclass=domain)(objectclass=organizationalunit)"'
- }
- </call>
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredComplexIncludes.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd}
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Filtered Excludes Complex
- #@TestID Filtered Excludes Complex
- #@TestPurpose Verify an export of a LDIF file specifying complex search filters control which entries are excluded in the export.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Filtered Excludes Complex')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Filtered Excludes Complex'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredComplexExcludes.ldif' % remote.data,
- 'extraParams' : '-E "&(objectclass=person)(ou=Departed)"'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredComplexExcludes.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Fractional Filtered Mix
- #@TestID Fractional Filtered Mix
- #@TestPurpose Verify an export of a LDIF file specifying a mix of fractional and filtered.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Fractional Filtered Mix')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Fractional Filtered Mix'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
- 'extraParams' : '-E "&(objectclass=person)(ou=Departed)" -b "dc=com" -e userpassword'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Append To LDIF
- #@TestID Append To LDIF
- #@TestPurpose Verify an export of a LDIF file specifying that the export process should append to the existing LDIF file.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Append To LDIF')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Append To LDIF'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
- 'extraParams' : '-a'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
-
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Compress LDIF
- #@TestID Compress LDIF
- #@TestPurpose Verify an export where the LDIF file is compressed.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Compress LDIF')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Compress LDIF'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/ExportCompressed.ldif' % remote.data,
- 'extraParams' : '-c'
- }
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/ExportCompressed.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'extraParams' : '-c'}
- </call>
-
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
-
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
- </call>
-
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
-
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
-
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Encrypt LDIF
- #@TestID Encrypt LDIF
- #@TestPurpose Verify an export where the LDIF file is encrypted.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Encrypt LDIF')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Encrypt LDIF'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/ExportEncrypted.ldif' % remote.data,
- 'extraParams' : '-y'
- }
- </call>
- <call function="'checktestRC'">
- { 'returncode' : RC,
- 'result' : STAXResult
- }
- </call>
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/ExportEncrypted.ldif' % remote.data,
- 'extraParams' : '-y',
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Export: Hash Signed LDIF
- #@TestID Hash Signed LDIF
- #@TestPurpose Verify an export where the LDIF file is hashed/signed.
- #@TestPreamble
- #@TestSteps
- #@TestPostamble
- #@TestResult
- -->
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Wrap Column
- #@TestID Wrap Column
- #@TestPurpose Verify an export of a LDIF file containing wrapped columns
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <testcase name="getTestCaseName('Export Wrap Column')">
- <sequence>
- <call function="'testCase_Preamble'"/>
- <message>
- 'Backend: Export: Export Wrap Column'
- </message>
- <call function="'exportLdif'">
- { 'ldifFile' : '%s/backends/ExportWrapCol.ldif' % remote.data,
- 'extraParams' : '--wrapColumn 25'
- }
- </call>
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
- <call function="'importLdif'">
- { 'ldifFile' : '%s/backends/ExportWrapCol.ldif' % remote.data,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
- <call function="'checktestRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult
- }
- </call>
- <!-- StartDS -->
- <call function="'StartDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
- }
- </call>
- <!-- Wait for DS to start -->
- <call function="'isAlive'">
- { 'location' : mylocation,
- 'noOfLoops' : 10 ,
- 'noOfMilliSeconds' : 2000,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsInstancePort' : DsInstancePort
- }
- </call>
- <call function="'checkImport'">
- { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
- 'uid=kvaughan,ou=People,dc=example,dc=com',
- 'uid=kwinters,ou=People,dc=example,dc=com'],
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsPort' : DsInstancePort,
- 'dsAdminPort' : DsInstanceAdminPort,
- 'startDS' : 'no'
- }
- </call>
- <!-- StopDS -->
- <call function="'StopDsWithScript'">
- { 'location' : mylocation,
- 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
- 'dsAdminPort' : DsInstanceAdminPort,
- 'dsBindDN' : mydn,
- 'dsBindPwd' : mypswd
- }
- </call>
- <call function="'testCase_Postamble'"/>
- </sequence>
- </testcase>
-
- <!--- Test Case information
- #@TestMarker Backend Export Tests
- #@TestName Backend: Export: Error Codes
- #@TestID Error Codes
- #@TestPurpose Verify an export fails with an error code.
- #@TestPreamble
- #@TestSteps Client calls exportLDIF with the parameters
- default backend, and ldifFile. Import the ldifFile to
- a second instance, then do a search to verify the import.
- #@TestPostamble
- #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
- -->
- <!-- Need to know what the error codes are -->
-
- </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>
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+ </try>
+ </testcase>
</function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: LDIF Default
+ #@TestID LDIF Default
+ #@TestPurpose Verify an export of a LDIF file on the default backend.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_002" scope="local">
+ <testcase name="getTestCaseName('LDIF Default')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'" />
+ <message>
+ 'Backend: Export: Export default backend'
+ </message>
+ <call function="'exportLdif'">
+ {
+ 'ldifFile' : '%s/backends/Export_default.ldif' % remote.data,
+ 'backEnd' : '%s' % DIRECTORY_INSTANCE_BE
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_default.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ {'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+ </try>
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: LDIF Non Default
+ #@TestID LDIF Non Default
+ #@TestPurpose Verify an export of a LDIF file on a differrent backend to the default.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ non-default backend, and ldifFile
+ #@TestPostamble
+ #@TestResult Success if Success if exportLDIF, importLDIF returns 0
+ -->
+ <function name="backends_export_003" scope="local">
+ <testcase name="getTestCaseName('LDIF Non Default')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export non-default backend'
+ </message>
+
+ <call function="'StartDsWithScript'"/>
+
+ <script>
+ options=[]
+ options.append('--backend-name "nonDefault"')
+ options.append('--set base-dn:"dc=non-default,dc=com"')
+ options.append('--set enabled:true')
+ options.append('--set writability-mode:enabled')
+ options.append('-t local-db')
+ createBackendOptions=' '.join(options)
+ </script>
+
+ <call function="'dsconfig'">
+ { 'subcommand' : 'create-backend',
+ 'optionsString' : createBackendOptions
+ }
+ </call>
+
+ <call function="'importLdifTask'">
+ { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsInstancePort' : DIRECTORY_INSTANCE_PORT,
+ 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
+ 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
+ 'taskID' : STAXCurrentTestcase,
+ 'ldifFile' : '%s/backends/nonDefault.ldif' % remote.data,
+ 'backEnd' : 'nonDefault'
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=scarter,ou=People,dc=non-default,dc=com',
+ 'uid=dmiller, ou=People, dc=non-default,dc=com',
+ 'uid=rhunt, ou=People, dc=non-default,dc=com'],
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <call function="'StopDsWithScript'"/>
+
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_nonDefault.ldif' % remote.data,
+ 'backEnd' : 'nonDefault'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_nonDefault.ldif' % remote.data,
+ 'dsBackEnd' : 'nonDefault' ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ {'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)}
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=scarter,ou=People,dc=non-default,dc=com',
+ 'uid=dmiller, ou=People, dc=non-default,dc=com',
+ 'uid=rhunt, ou=People, dc=non-default,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'dsBindDN' : mydn,
+ 'dsBindPwd' : mypswd
+ }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Include Branch
+ #@TestID Fractional Include Branch
+ #@TestPurpose Verify an export of a LDIF file specifying a branch that should be included in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and -b option. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_004" scope="local">
+ <testcase name="getTestCaseName('Fractional Include Branch')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Include Branch'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_IncludeBranch.ldif' % remote.data,
+ 'extraParams' : '-b "dc=com"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_IncludeBranch.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Include Branches
+ #@TestID Fractional Include Branches
+ #@TestPurpose Verify an export of a LDIF file specifying multiple branches that should be included in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and two -b options. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_005" scope="local">
+ <testcase name="getTestCaseName('Fractional Include Branches')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Include Branches'
+ </message>
+ <call function="'exportLdif'">
+ {
+ 'ldifFile' : '%s/backends/Export_IncludeBranches.ldif' % remote.data,
+ 'extraParams' : '-b "dc=com" -b "dc=example,dc=com"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_IncludeBranches.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Exclude Branch
+ #@TestID Fractional Exclude Branch
+ #@TestPurpose Verify an export of a LDIF file specifying a branch that should be excluded in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and -B option. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_006" scope="local">
+ <testcase name="getTestCaseName('Fractional Exclude Branch')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Exclude Branch'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_ExcludeBranch.ldif' % remote.data,
+ 'extraParams' : '-B "dc=example,dc=com"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_ExcludeBranch.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'missingEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com'],
+ 'expectedEntries' : ['dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Exclude Branches
+ #@TestID Fractional Exclude Branches
+ #@TestPurpose Verify an export of a LDIF file specifying multiple branches that should be excluded in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and two -B options. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_007" scope="local">
+ <testcase name="getTestCaseName('Export Fractional Exclude Branches')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Exclude Branches'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_ExcludeBranches.ldif' % remote.data,
+ 'extraParams' : '-B "ou=People,dc=example,dc=com" -B "dc=example,dc=com"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_ExcludeBranches.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'missingEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com'],
+ 'expectedEntries' : ['dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Branches Mix
+ #@TestID Fractional Branches Mix
+ #@TestPurpose Verify an export of a LDIF file specifying a mix of include and exclude branches.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, both -b and -B options. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_008" scope="local">
+ <testcase name="getTestCaseName('Export Fractional Branches Mix')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Branches Mix'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_MixBranches.ldif' % remote.data,
+ 'extraParams' : '-b "dc=com" -B "ou=People,dc=example,dc=com"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_MixBranches.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'missingEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com'],
+ 'expectedEntries' : ['dc=com','dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'}
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Include Attribute
+ #@TestID Fractional Include Attribute
+ #@TestPurpose Verify an export of a LDIF file specifying an attribute that should be included in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and -i option. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_009" scope="local">
+ <testcase name="getTestCaseName('Export Fractional Include Attribute')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Include Attribute'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_IncludeAttr.ldif' % remote.data,
+ 'extraParams' : '-i dc'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_IncludeAttr.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['dc=com','dc=example,dc=com'],
+ 'missingEntries' : ['ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Include Attributes
+ #@TestID Fractional Include Attributes
+ #@TestPurpose Verify an export of a LDIF file specifying multiple attributes that should be included in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and five -i options. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_010" scope="local">
+ <testcase name="getTestCaseName('Export Fractional Include Attributes')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Include Attributes'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_IncludeAttrs.ldif' % remote.data,
+ 'extraParams' : '-i dc -i cn -i ou -i sn -i uid'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_IncludeAttrs.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'missingAttributes' : ['userpassword'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Exclude Attribute
+ #@TestID Fractional Exclude Attribute
+ #@TestPurpose Verify an export of a LDIF file specifying an attribute that should be excluded in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and -e option. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_011" scope="local">
+ <testcase name="getTestCaseName('Export Fractional Exclude Attribute')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Exclude Attribute'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_ExcludeAttr.ldif' % remote.data,
+ 'extraParams' : '-e userpassword'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_ExcludeAttr.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com'],
+ 'missingAttributes' : ['userpassword'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Exclude Attributes
+ #@TestID Fractional Exclude Attributes
+ #@TestPurpose Verify an export of a LDIF file specifying multiple attribute that should be excluded in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and three -e options. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_012" scope="local">
+ <testcase name="getTestCaseName('Export Fractional Exclude Attributes')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Exclude Attributes'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_ExcludeAttrs.ldif' % remote.data,
+ 'extraParams' : '-e userpassword -e mail -e roomnumber'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_ExcludeAttrs.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'missingAttributes' : ['userpassword','mail','roomnumber'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Mix
+ #@TestID Fractional Mix
+ #@TestPurpose Verify an export of a LDIF file specifying a mix of fractional attributes and branches.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and mixed -i, -b, and -B options. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_013" scope="local">
+ <testcase name="getTestCaseName('Export Fractional Mix')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Mix'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_FractionalMix.ldif' % remote.data,
+ 'extraParams' : '-i dc -i cn -i ou -i sn -i uid -b "dc=com" -b "dc=example,dc=com" -b "ou=People,dc=example,dc=com" -B "ou=Departed,ou=People,dc=example,dc=com"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FractionalMix.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'missingAttributes' : ['userpassword'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Filtered Include
+ #@TestID Filtered Include
+ #@TestPurpose Verify an export of a LDIF file specifying a search filter control which entries are included in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and -I option. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_014" scope="local">
+ <testcase name="getTestCaseName('Export Filtered Include')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Filtered Include'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_FilteredInclude.ldif' % remote.data,
+ 'extraParams' : '-I "objectclass=*"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FilteredInclude.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Filtered Includes
+ #@TestID Filtered Includes
+ #@TestPurpose Verify an export of a LDIF file specifying a search filter control which entries are included in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and two -I options. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_015" scope="local">
+ <testcase name="getTestCaseName('Export Filtered Includes')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Filtered Includes'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
+ 'extraParams' : '-I "objectclass=domain" -I "objectclass=organizationalunit"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['dc=example,dc=com', 'dc=com'],
+ 'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
+ 'uid=dmiller,ou=People,dc=example,dc=com',
+ 'uid=rhunt,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'}
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Filtered Exclude
+ #@TestID Filtered Exclude
+ #@TestPurpose Verify an export of a LDIF file specifying search filter control which entries are excluded in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, an ldifFile, and -E option. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_016" scope="local">
+ <testcase name="getTestCaseName('Export Filtered Exclude')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Filtered Exclude'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_FilteredExclude.ldif' % remote.data,
+ 'extraParams' : '-E "objectclass=person"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FilteredExclude.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['dc=example,dc=com',
+ 'ou=People,dc=example,dc=com'],
+ 'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
+ 'uid=dmiller,ou=People,dc=example,dc=com',
+ 'uid=rhunt,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Filtered Excludes
+ #@TestID Filtered Excludes
+ #@TestPurpose Verify an export of a LDIF file specifying multiple search filters control which entries are excluded in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_017" scope="local">
+ <testcase name="getTestCaseName('Export Filtered Excludes')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Filtered Excludes'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_FilteredExcludes.ldif' % remote.data,
+ 'extraParams' : '-E "objectclass=person" -E "objectclass=organizationalunit"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FilteredExcludes.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['dc=example,dc=com',
+ 'dc=com'],
+ 'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
+ 'uid=dmiller,ou=People,dc=example,dc=com',
+ 'uid=rhunt,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Filtered Includes
+ #@TestID Filtered Includes
+ #@TestPurpose Verify an export of a LDIF file specifying multiple search filters control which entries are included in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_018" scope="local">
+ <testcase name="getTestCaseName('Export Filtered Includes')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Filtered Includes'
+ </message>
+ <call function="'exportLdif'">
+ {
+ 'ldifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
+ 'extraParams' : '-I "objectclass=domain" -I "objectclass=organizationalunit"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FilteredIncludes.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['dc=example,dc=com',
+ 'ou=People,dc=example,dc=com'],
+ 'missingEntries' : ['uid=scarter,ou=People,dc=example,dc=com',
+ 'uid=dmiller,ou=People,dc=example,dc=com',
+ 'uid=rhunt,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'}
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Filtered Includes Complex
+ #@TestID Filtered Includes Complex
+ #@TestPurpose Verify an export of a LDIF file specifying complex search filters control which entries are included in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_019" scope="local">
+ <testcase name="getTestCaseName('Export Filtered Includes Complex')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Filtered Includes Complex'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_FilteredComplexIncludes.ldif' % remote.data,
+ 'extraParams' : '-I "|(objectclass=person)(objectclass=domain)(objectclass=organizationalunit)"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FilteredComplexIncludes.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Filtered Excludes Complex
+ #@TestID Filtered Excludes Complex
+ #@TestPurpose Verify an export of a LDIF file specifying complex search filters control which entries are excluded in the export.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_020" scope="local">
+ <testcase name="getTestCaseName('Export Filtered Excludes Complex')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Filtered Excludes Complex'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_FilteredComplexExcludes.ldif' % remote.data,
+ 'extraParams' : '-E "&(objectclass=person)(ou=Departed)"'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FilteredComplexExcludes.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Fractional Filtered Mix
+ #@TestID Fractional Filtered Mix
+ #@TestPurpose Verify an export of a LDIF file specifying a mix of fractional and filtered.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_021" scope="local">
+ <testcase name="getTestCaseName('Export Fractional Filtered Mix')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Fractional Filtered Mix'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
+ 'extraParams' : '-E "&(objectclass=person)(ou=Departed)" -b "dc=com" -e userpassword'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Append To LDIF
+ #@TestID Append To LDIF
+ #@TestPurpose Verify an export of a LDIF file specifying that the export process should append to the existing LDIF file.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_022" scope="local">
+ <testcase name="getTestCaseName('Export Append To LDIF')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Append To LDIF'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
+ 'extraParams' : '-a'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/Export_FilteredMix.ldif' % remote.data,
+ 'dsAppend' : 'True' ,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Compress LDIF
+ #@TestID Compress LDIF
+ #@TestPurpose Verify an export where the LDIF file is compressed.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_023" scope="local">
+ <testcase name="getTestCaseName('Export Compress LDIF')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Compress LDIF'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/ExportCompressed.ldif' % remote.data,
+ 'extraParams' : '-c'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/ExportCompressed.ldif' % remote.data,
+ 'dsIsCompressed' : 'True' ,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Encrypt LDIF
+ #@TestID Encrypt LDIF
+ #@TestPurpose Verify an export where the LDIF file is encrypted.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_024" scope="local">
+ <testcase name="getTestCaseName('Export Encrypt LDIF')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Encrypt LDIF'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/ExportEncrypted.ldif' % remote.data,
+ 'extraParams' : '-y'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/ExportEncrypted.ldif' % remote.data,
+ 'dsIsEncrypted' : 'True' ,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Export: Hash Signed LDIF
+ #@TestID Hash Signed LDIF
+ #@TestPurpose Verify an export where the LDIF file is hashed/signed.
+ #@TestPreamble
+ #@TestSteps
+ #@TestPostamble
+ #@TestResult
+ -->
+
+ <function name="backends_export_025" scope="local">
+ <testcase name="getTestCaseName('Hash Signed LDIF')">
+ <try>
+ <sequence>
+
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Hash Signed LDIF'
+ </message>
+ <!-- Known issue -->
+ <call function="'checktestRC'">
+ { 'returncode' : 1 ,
+ 'expected' : 0 ,
+ 'result' : 'Hash Signed LDIF export is not implemented',
+ 'issue' : '839'
+ }
+ </call>
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Wrap Column
+ #@TestID Wrap Column
+ #@TestPurpose Verify an export of a LDIF file containing wrapped columns
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <function name="backends_export_026" scope="local">
+ <testcase name="getTestCaseName('Export Wrap Column')">
+ <try>
+ <sequence>
+ <call function="'testCase_Preamble'"/>
+ <message>
+ 'Backend: Export: Export Wrap Column'
+ </message>
+ <call function="'exportLdif'">
+ { 'ldifFile' : '%s/backends/ExportWrapCol.ldif' % remote.data,
+ 'extraParams' : '--wrapColumn 25'
+ }
+ </call>
+
+ <call function="'ImportLdifWithScript'">
+ { 'dsLdifFile' : '%s/backends/ExportWrapCol.ldif' % remote.data,
+ 'dsBackEnd' : DIRECTORY_INSTANCE_BE ,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME)
+ }
+ </call>
+
+ <!-- StartDS -->
+ <call function="'StartDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+ <!-- Wait for DS to start -->
+ <call function="'isAlive'">
+ { 'noOfLoops' : 10 ,
+ 'noOfMilliSeconds' : 2000,
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsInstancePort' : DsInstancePort
+ }
+ </call>
+ <call function="'checkImport'">
+ { 'expectedEntries' : ['uid=tmorris,ou=People,dc=example,dc=com',
+ 'uid=kvaughan,ou=People,dc=example,dc=com',
+ 'uid=kwinters,ou=People,dc=example,dc=com'],
+ 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME),
+ 'dsPort' : DsInstancePort,
+ 'dsAdminPort' : DsInstanceAdminPort,
+ 'startDS' : 'no'
+ }
+ </call>
+ <!-- StopDS -->
+ <call function="'StopDsWithScript'">
+ { 'dsPath' : '%s/%s' % (DsInstanceDir, OPENDSNAME) }
+ </call>
+
+ </sequence>
+
+ <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
+ <message log="1" level="'fatal'">
+ '%s: Test failed. eInfo(%s)' % (eType,eInfo)
+ </message>
+ </catch>
+
+ <finally>
+ <call function="'testCase_Postamble'"/>
+ </finally>
+
+ </try>
+
+ </testcase>
+ </function>
+
+ <!--- Test Case information
+ #@TestMarker Backend Export Tests
+ #@TestName Backend: Export: Error Codes
+ #@TestID Error Codes
+ #@TestPurpose Verify an export fails with an error code.
+ #@TestPreamble
+ #@TestSteps Client calls exportLDIF with the parameters
+ default backend, and ldifFile. Import the ldifFile to
+ a second instance, then do a search to verify the import.
+ #@TestPostamble
+ #@TestResult Success if exportLDIF, importLDIF, and checkImport returns 0
+ -->
+ <!-- Need to know what the error codes are -->
+
</stax>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/backends/import-tasks/import-tasks_tests.xml b/opends/tests/staf-tests/functional-tests/testcases/backends/import-tasks/import-tasks_tests.xml
index 2543674..424db23 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/backends/import-tasks/import-tasks_tests.xml
+++ b/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' : ['&(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' : ['&(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' : ['&(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' : ['&(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>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/backends/import/import_tests.xml b/opends/tests/staf-tests/functional-tests/testcases/backends/import/import_tests.xml
index 163f8b8..7acdbca 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/backends/import/import_tests.xml
+++ b/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' : ['&(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' : ['&(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' : ['&(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' : ['&(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>
--
Gitblit v1.10.0