| opends/tests/functional-tests/testcases/backends/backends.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/backends/backendsetup.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/backends/backup-tasks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/backends/backup.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/backends/export-tasks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/backends/export.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/backends/restore-tasks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/functional-tests/testcases/backends/restore.xml | ●●●●● patch | view | raw | blame | history |
opends/tests/functional-tests/testcases/backends/backends.xml
@@ -23,7 +23,7 @@ ! ! CDDL HEADER END ! ! Portions Copyright 2006 Sun Microsystems, Inc. ! Portions Copyright 2006-2007 Sun Microsystems, Inc. ! --> <stax> @@ -41,6 +41,37 @@ file="'%s/testcases/backends/import-tasks.xml' % (TESTS_DIR)"/> <call function="'main_import-tasks'" /> <import machine="'%s' % (STAF_LOCAL_HOSTNAME)" file="'%s/testcases/backends/backendsetup.xml' % (TESTS_DIR)"/> <call function="'main_backend-setup'" /> <import machine="'%s' % (STAF_LOCAL_HOSTNAME)" file="'%s/testcases/backends/backup-tasks.xml' % (TESTS_DIR)"/> <call function="'main_backup-tasks'" /> <import machine="'%s' % (STAF_LOCAL_HOSTNAME)" file="'%s/testcases/backends/backup.xml' % (TESTS_DIR)"/> <call function="'main_backup'" /> <import machine="'%s' % (STAF_LOCAL_HOSTNAME)" file="'%s/testcases/backends/restore-tasks.xml' % (TESTS_DIR)"/> <call function="'main_restore-tasks'" /> <import machine="'%s' % (STAF_LOCAL_HOSTNAME)" file="'%s/testcases/backends/restore.xml' % (TESTS_DIR)"/> <call function="'main_restore'" /> <import machine="'%s' % (STAF_LOCAL_HOSTNAME)" file="'%s/testcases/backends/export-tasks.xml' % (TESTS_DIR)"/> <call function="'main_export-tasks'" /> <import machine="'%s' % (STAF_LOCAL_HOSTNAME)" file="'%s/testcases/backends/export.xml' % (TESTS_DIR)"/> <call function="'main_export'" /> <!-- Set the server backup the way it was before the backend tests --> <call function="'main_quickstart'" /> </sequence> </function> opends/tests/functional-tests/testcases/backends/backendsetup.xml
New file @@ -0,0 +1,87 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "stax.dtd"> <!-- ! CDDL HEADER START ! ! The contents of this file are subject to the terms of the ! Common Development and Distribution License, Version 1.0 only ! (the "License"). You may not use this file except in compliance ! with the License. ! ! You can obtain a copy of the license at ! trunk/opends/resource/legal-notices/OpenDS.LICENSE ! or https://OpenDS.dev.java.net/OpenDS.LICENSE. ! See the License for the specific language governing permissions ! and limitations under the License. ! ! 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: ! Portions Copyright [yyyy] [name of copyright owner] ! ! CDDL HEADER END ! ! Portions Copyright 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main_backend-setup"/> <function name="main_backend-setup"> <sequence> <!--- Test Suite information #@TestSuiteName Backend Setup #@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/ --> <!--- Test Case information #@TestMarker Backend Export, Backup, and Restore Tests #@TestName Import: LDIF Default #@TestID LDIF Default #@TestPurpose Add entries that are required for these Backend Tests. #@TestPreamble #@TestSteps ./import-ldif.sh -l data/backends/backend_start.ldif -n "userRoot" #@TestPostamble #@TestResult --> <testcase name="'Backend: Backend Setup'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend: Backend Setup for Export, Backup, and Restore Tests' </message> <call function="'importLdif'"> { 'ldifFile' : '%s/backends/backend_start.ldif' % STAGED_DATA_DIR } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> </sequence> </function> </stax> opends/tests/functional-tests/testcases/backends/backup-tasks.xml
New file @@ -0,0 +1,96 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "stax.dtd"> <!-- ! CDDL HEADER START ! ! The contents of this file are subject to the terms of the ! Common Development and Distribution License, Version 1.0 only ! (the "License"). You may not use this file except in compliance ! with the License. ! ! You can obtain a copy of the license at ! trunk/opends/resource/legal-notices/OpenDS.LICENSE ! or https://OpenDS.dev.java.net/OpenDS.LICENSE. ! 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 ! 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: ! Portions Copyright [yyyy] [name of copyright owner] ! ! CDDL HEADER END ! ! Portions Copyright 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main_backup-tasks"/> <function name="main_backup-tasks"> <sequence> <!--- Start DS --> <sequence> <message> 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT) </message> <call function="'startDS'"> { 'dsbinpath' : '%s' % (OPENDS_BINPATH) } </call> <call function="'checkRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> </sequence> <!--- Check that DS started --> <call function="'isAlive'"> { 'noOfLoops' : 5 , 'noOfMilliSeconds' : 2000 } </call> <testcase name="'Backend: Backup Tasks 1'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend ExportTasks1: Backup the data in OpenDS by scheduling a task' </message> <call function="'backupTask'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstancePort' : DIRECTORY_INSTANCE_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'taskID' : '3', 'backupDir' : '%s/backends/' % STAGED_DATA_DIR } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> </sequence> </function> </stax> opends/tests/functional-tests/testcases/backends/backup.xml
New file @@ -0,0 +1,240 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "stax.dtd"> <!-- ! CDDL HEADER START ! ! The contents of this file are subject to the terms of the ! Common Development and Distribution License, Version 1.0 only ! (the "License"). You may not use this file except in compliance ! with the License. ! ! You can obtain a copy of the license at ! trunk/opends/resource/legal-notices/OpenDS.LICENSE ! or https://OpenDS.dev.java.net/OpenDS.LICENSE. ! 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 ! 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: ! Portions Copyright [yyyy] [name of copyright owner] ! ! CDDL HEADER END ! ! Portions Copyright 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main_backup"/> <function name="main_backup"> <sequence> <!--- Test Suite information #@TestSuiteName Backend Backup Tests #@TestSuitePurpose Verify that the basic backup functionality is working in the Directory Server. #@TestSuiteID Backup Tests #@TestSuiteGroup Backup #@TestGroup Backend #@TestScript backup.xml #@TestHTMLLink http://opends.dev.java.net/ --> <!--- Test Case information #@TestMarker Backend Backup Tests #@TestName Export: Backup 1 #@TestID Backup1 #@TestPurpose Backup the data in OpenDS. #@TestPreamble #@TestSteps Client calls backup with the parameters default backendID, and backupDirectory #@TestPostamble #@TestResult Success if backup returns 0 --> <testcase name="'Backend: Backup 1'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Backup1: Create a backup of the data in OpenDS' </message> <call function="'backup'"> { 'backupDir' : '%s/backends/backup1' % STAGED_DATA_DIR } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Backup Tests #@TestName Export: Backup 2 #@TestID Backup2 #@TestPurpose Create an incremental backup of the data in OpenDS. #@TestPreamble #@TestSteps Client calls backup with the parameters default backendID, backupDir, and incremental #@TestPostamble #@TestResult Success if backup returns 0 --> <testcase name="'Backend: Backup 2'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Backup2: Create an incremental backup of the data in OpenDS' </message> <call function="'backup'"> { 'backupDir' : '%s/backends/backup1' % STAGED_DATA_DIR, 'extraParams' : '-i' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Backup Tests #@TestName Export: Backup 3 #@TestID Backup3 #@TestPurpose Create a backup of the data in OpenDS with a backup id. #@TestPreamble #@TestSteps Client calls backup with the parameters default backendID, backupDir, and backupID #@TestPostamble #@TestResult Success if backup returns 0 --> <testcase name="'Backend: Backup 3'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Backup3: Create a backup of the data in OpenDS with a backup id' </message> <call function="'backup'"> { 'backupDir' : '%s/backends/backup2' % STAGED_DATA_DIR, 'extraParams' : '-I 20070714142807Z' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Backup Tests #@TestName Export: Backup 4 #@TestID Backup4 #@TestPurpose Create an incremental backup of the data in OpenDS with a backup id. #@TestPreamble #@TestSteps Client calls backup with the parameters default backendID, backupDir, incremental, and backupID #@TestPostamble #@TestResult Success if backup returns 0 --> <testcase name="'Backend: Backup 4'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Backup4: Create an incremental backup of the data in OpenDS with a backup id' </message> <call function="'backup'"> { 'backupDir' : '%s/backends/backup2' % STAGED_DATA_DIR, 'extraParams' : '-B 20070714142807Z -i' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Backup Tests #@TestName Export: Backup 5 #@TestID Backup5 #@TestPurpose Create a compressed backup of the data in OpenDS. #@TestPreamble #@TestSteps Client calls backup with the parameters default backendID, backupDir, and compress #@TestPostamble #@TestResult Success if backup returns 0 --> <testcase name="'Backend: Backup 5'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Backup5: Create a compressed backup of the data in OpenDS' </message> <call function="'backup'"> { 'backupDir' : '%s/backends/backup1' % STAGED_DATA_DIR, 'extraParams' : '-c' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> </sequence> </function> </stax> opends/tests/functional-tests/testcases/backends/export-tasks.xml
@@ -23,17 +23,42 @@ ! ! CDDL HEADER END ! ! Portions Copyright 2006 Sun Microsystems, Inc. ! Portions Copyright 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main"/> <defaultcall function="main_export-tasks"/> <function name="main"> <function name="main_export-tasks"> <sequence> <!--- Start DS --> <sequence> <message> 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT) </message> <call function="'startDS'"> { 'dsbinpath' : '%s' % (OPENDS_BINPATH) } </call> <call function="'checkRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> </sequence> <sequence> <!--- Check that DS started --> <call function="'isAlive'"> { 'noOfLoops' : 5 , 'noOfMilliSeconds' : 2000 } </call> <!--- Test Suite information #@TestSuiteName Backend Export Tasks Tests #@TestSuitePurpose Verify that the basic export task functionality is working in the Directory Server. @@ -46,6 +71,50 @@ <!--- 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="'testCaseStartBanner'"/> <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' % STAGED_DATA_DIR } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </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. @@ -318,7 +387,7 @@ #@TestPostamble #@TestResult --> </sequence> </sequence> </function> opends/tests/functional-tests/testcases/backends/export.xml
@@ -23,17 +23,18 @@ ! ! CDDL HEADER END ! ! Portions Copyright 2006 Sun Microsystems, Inc. ! Portions Copyright 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main"/> <defaultcall function="main_export"/> <function name="main"> <function name="main_export"> <sequence> <!--- Test Suite information #@TestSuiteName Backend Export Tests #@TestSuitePurpose Verify that the basic export functionality is working in the Directory Server. @@ -46,6 +47,588 @@ <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 1 #@TestID Export1 #@TestPurpose Export the data in OpenDS. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, and ldifFile #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 1'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export1: Export the data in OpenDS' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export1.ldif' % STAGED_DATA_DIR } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 2 #@TestID Export2 #@TestPurpose Export the data in OpenDS by appending to an ldif file. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and append #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 2'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export2: Export the data in OpenDS by appending to an ldif file' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export1.ldif' % STAGED_DATA_DIR, 'extraParams' : '-a' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 3 #@TestID Export3 #@TestPurpose Export the data in OpenDS with one includeAttribute parameter. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and includeAttribute #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 3'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export3: Export the data in OpenDSwith one includeAttribute parameter ' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export3.ldif' % STAGED_DATA_DIR, 'extraParams' : '-i telephonenumber' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 4 #@TestID Export4 #@TestPurpose Export the data in OpenDS with three includeAttribute parameters. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and includeAttribute #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 4'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export4: Export the data in OpenDS with three includeAttribute parameters' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export4.ldif' % STAGED_DATA_DIR, 'extraParams' : '-i telephonenumber -i mail -i roomnumber' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 5 #@TestID Export5 #@TestPurpose Export the data in OpenDS with one excludeAttribute parameter. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and excludeAttribute #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 5'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export5: Export the data in OpenDS with one excludeAttribute parameter' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export5.ldif' % STAGED_DATA_DIR, 'extraParams' : '-e telephonenumber' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 6 #@TestID Export6 #@TestPurpose Export the data in OpenDS with three excludeAttribute parameters. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and excludeAttribute #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 6'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export6: Export the data in OpenDS with three excludeAttribute parameters' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export6.ldif' % STAGED_DATA_DIR, 'extraParams' : '-e telephonenumber -e mail -e roomnumber' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 7 #@TestID Export7 #@TestPurpose Export the data in OpenDS with one includeFilter parameter. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and includeFilter #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 7'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export7: Export the data in OpenDS with one includeFilter parameter' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export7.ldif' % STAGED_DATA_DIR, 'extraParams' : '-I "(&(uid=jwalker)(roomnumber=*))' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 8 #@TestID Export8 #@TestPurpose Export the data in OpenDS with three includeFilter parameters. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and includeFilter #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 8'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export8: Export the data in OpenDS with three includeFilter parameters' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export8.ldif' % STAGED_DATA_DIR, 'extraParams' : '-I "(&(uid=jwalker)(roomnumber=*))" -I "(&(uid=jwalker)(l=Cupertino))" -I "(&(uid=jwallace)(roomnumber=*))"' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 9 #@TestID Export9 #@TestPurpose Export the data in OpenDS with one excludeFilter parameter. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and excludeFilter #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 9'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export9: Export the data in OpenDS with one excludeFilter parameter' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export9.ldif' % STAGED_DATA_DIR, 'extraParams' : '-E "(&(uid=jwalker)(roomnumber=*))"' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 10 #@TestID Export10 #@TestPurpose Export the data in OpenDS with three excludeFilter parameters. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and excludeFilter #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 10'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export10: Export the data in OpenDS with three excludeFilter parameters' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export10.ldif' % STAGED_DATA_DIR, 'extraParams' : '-E "(&(uid=jwalker)(roomnumber=*))" -E "(&(uid=jwalker)(l=Cupertino))" -E "(&(uid=jwallace)(roomnumber=*))"' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 11 #@TestID Export11 #@TestPurpose Export the data in OpenDS with one includeBranch parameter. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and includeBranch #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 11'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export11: Export the data in OpenDS with one includeBranch parameter' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export11.ldif' % STAGED_DATA_DIR, 'extraParams' : '-b "o=backend tests,dc=example,dc=com"' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 12 #@TestID Export12 #@TestPurpose Export the data in OpenDS with one excludeBranch parameter. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and excludeBranch #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 12'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export12: Export the data in OpenDS with one excludeBranch parameter' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export12.ldif' % STAGED_DATA_DIR, 'extraParams' : '-B "ou=People,o=backend tests,dc=example,dc=com"' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 13 #@TestID Export13 #@TestPurpose Export the data in OpenDS with one includeAttribute, excludeFilter, and includeBranch parameters. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, includeAttribute, excludeFilter, and includeBranch #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 13'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export13: Export the data in OpenDS with one includeAttribute, excludeFilter, and includeBranch parameters' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export13.ldif' % STAGED_DATA_DIR, 'extraParams' : '-E "(&(uid=jwalker)(roomnumber=*))" -i telephonenumber -b "o=backend tests,dc=example,dc=com"' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 14 #@TestID Export14 #@TestPurpose Export the data in OpenDS with one excludeAttribute, includeFilter, and excludeBranch parameters. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, excludeAttribute, includeFilter, and excludeBranch #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 14'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export14: Export the data in OpenDS with one excludeAttribute, includeFilter, and excludeBranch parameters' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export14.ldif' % STAGED_DATA_DIR, 'extraParams' : '-I "(&(uid=jwalker)(roomnumber=*))" -e telephonenumber -B "ou=groups,o=backend tests,dc=example,dc=com"' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 15 #@TestID Export15 #@TestPurpose Export the data in OpenDS in compressed format. #@TestPreamble #@TestSteps Client calls exportLDIF with the parameters default backend, ldifFile, and compressLDIF #@TestPostamble #@TestResult Success if exportLDIF returns 0 --> <testcase name="'Backend: Export 15'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Export15: Export the data in OpenDS in compressed format' </message> <call function="'exportLdif'"> { 'ldifFile' : '%s/backends/Export15.ldif' % STAGED_DATA_DIR, 'extraParams' : '-c' } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: Export 1 #@TestID Export1 #@TestPurpose #@TestPreamble #@TestSteps #@TestPostamble #@TestResult --> <!--- Test Case information #@TestMarker Backend Export Tests #@TestName Export: LDIF Default #@TestID LDIF Default #@TestPurpose Verify an export of a LDIF file on the default backend. opends/tests/functional-tests/testcases/backends/restore-tasks.xml
New file @@ -0,0 +1,95 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "stax.dtd"> <!-- ! CDDL HEADER START ! ! The contents of this file are subject to the terms of the ! Common Development and Distribution License, Version 1.0 only ! (the "License"). You may not use this file except in compliance ! with the License. ! ! You can obtain a copy of the license at ! trunk/opends/resource/legal-notices/OpenDS.LICENSE ! or https://OpenDS.dev.java.net/OpenDS.LICENSE. ! 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 ! 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: ! Portions Copyright [yyyy] [name of copyright owner] ! ! CDDL HEADER END ! ! Portions Copyright 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main_restore-tasks"/> <function name="main_restore-tasks"> <sequence> <!--- Test Suite information #@TestSuiteName Backend Restore Tasks Tests #@TestSuitePurpose Verify that the basic restore task functionality is working in the Directory Server. #@TestSuiteID Restore Tasks Tests #@TestSuiteGroup Restore Tasks #@TestGroup Backend #@TestScript restore-tasks.xml #@TestHTMLLink http://opends.dev.java.net/ --> <!--- Test Case information #@TestMarker Backend Restore Tasks Tests #@TestName Restore Tasks: Restore Tasks 1 #@TestID RestoreTasks1 #@TestPurpose Verify an restore task of a LDIF file on the default backend. #@TestPreamble #@TestSteps An ldif file is created that describes the restore 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: Restore Tasks 1'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend RestoreTasks1: Restore the data in OpenDS by scheduling a task' </message> <call function="'restoreTask'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstancePort' : DIRECTORY_INSTANCE_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'taskID' : '4', 'backupDir' : '%s/backends/' % STAGED_DATA_DIR } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> </sequence> </function> </stax> opends/tests/functional-tests/testcases/backends/restore.xml
New file @@ -0,0 +1,129 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "stax.dtd"> <!-- ! CDDL HEADER START ! ! The contents of this file are subject to the terms of the ! Common Development and Distribution License, Version 1.0 only ! (the "License"). You may not use this file except in compliance ! with the License. ! ! You can obtain a copy of the license at ! trunk/opends/resource/legal-notices/OpenDS.LICENSE ! or https://OpenDS.dev.java.net/OpenDS.LICENSE. ! 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 ! 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: ! Portions Copyright [yyyy] [name of copyright owner] ! ! CDDL HEADER END ! ! Portions Copyright 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main_restore"/> <function name="main_restore"> <sequence> <!--- Test Suite information #@TestSuiteName Backend Restore Tests #@TestSuitePurpose Test the restore functionality for OpenDS. #@TestSuiteID Restore Tests #@TestSuiteGroup Restore #@TestGroup Backend #@TestScript restore.xml #@TestHTMLLink http://opends.dev.java.net/ --> <!--- Test Case information #@TestMarker Backend Restore Tests #@TestName Export: Restore 1 #@TestID Restore1 #@TestPurpose Restore data to OpenDS. #@TestPreamble #@TestSteps Client calls restore with the parameters default backendID, and backupDirectory #@TestPostamble #@TestResult Success if restore returns 0 --> <testcase name="'Backend: Restore 1'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Restore1: Restore data to OpenDS' </message> <call function="'restore'"> { 'backupDir' : '%s/backends/backup1' % STAGED_DATA_DIR } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Restore Tests #@TestName Export: Restore 2 #@TestID Restore2 #@TestPurpose Restore compressed data to OpenDS. #@TestPreamble #@TestSteps Client calls restore with the parameters default backendID, backupDirectory, and uncompress is automatically done #@TestPostamble #@TestResult Success if restore returns 0 --> <testcase name="'Backend: Restore 2'"> <sequence> <call function="'testCaseStartBanner'"/> <message> 'Backend Restore2: Restore compressed data to OpenDS' </message> <call function="'backup'"> { 'backupDir' : '%s/restore.compressed' % STAGED_DATA_DIR } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCaseEndBanner'"/> </sequence> </testcase> </sequence> </function> </stax>