From 3d298aaf5f040a720b1c32fe5c87a292a0950e20 Mon Sep 17 00:00:00 2001
From: al_xipe <al_xipe@localhost>
Date: Wed, 15 Aug 2007 03:47:14 +0000
Subject: [PATCH] more fixes and refactoring for the backends suite. Some additional error checking in runCommand and some clean up in dsconfig.xml
---
opends/tests/functional-tests/testcases/backends/export-tasks.xml | 658 ++++++++++++++++++++++++++++-------------------------------
1 files changed, 313 insertions(+), 345 deletions(-)
diff --git a/opends/tests/functional-tests/testcases/backends/export-tasks.xml b/opends/tests/functional-tests/testcases/backends/export-tasks.xml
index abc4ab1..7d75544 100644
--- a/opends/tests/functional-tests/testcases/backends/export-tasks.xml
+++ b/opends/tests/functional-tests/testcases/backends/export-tasks.xml
@@ -25,27 +25,18 @@
!
! Portions Copyright 2007 Sun Microsystems, Inc.
! -->
-
<stax>
-
<defaultcall function="main_export-tasks"/>
-
<function name="main_export-tasks">
-
<sequence>
-
<block name="'export-tasks'">
-
<sequence>
-
<script>
if not CurrentTestPath.has_key('group'):
- CurrentTestPath['group']='backends'
+ CurrentTestPath['group']='backends'
CurrentTestPath['suite']=STAXCurrentBlock
</script>
-
- <call function="'testSuite_Preamble'"/>
-
+ <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.
@@ -54,351 +45,328 @@
#@TestGroup Backend
#@TestScript export.xml
#@TestHTMLLink http://opends.dev.java.net/
- -->
-
+ -->
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/backends/backend_setup.xml' % (TESTS_DIR)"/>
<call function="'backend_setup'"> { 'loadBackend' : True } </call>
-
-
- <sequence>
+ <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="'Backend: Export Tasks: 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' % logsRemoteDataDir
+ }
+ </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: 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="'Backend: Export Tasks 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' % logsRemoteDataDir
- }
- </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 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: 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>
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/backends/backend_cleanup.xml' % (TESTS_DIR)"/>
<call function="'backend_cleanup'"/>
-
-
<call function="'testSuite_Postamble'"/>
-
</sequence>
-
</block>
-
</sequence>
-
</function>
-
</stax>
--
Gitblit v1.10.0