| opends/tests/staf-tests/functional-tests/testcases/backends/backup-tasks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/staf-tests/functional-tests/testcases/backends/backup-tasks/backup-tasks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/staf-tests/functional-tests/testcases/backends/backup-tasks/backup-tasks_tests.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/staf-tests/functional-tests/testcases/backends/restore-tasks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/staf-tests/functional-tests/testcases/backends/restore-tasks/restore-tasks.xml | ●●●●● patch | view | raw | blame | history | |
| opends/tests/staf-tests/functional-tests/testcases/backends/restore-tasks/restore-tasks_tests.xml | ●●●●● patch | view | raw | blame | history |
opends/tests/staf-tests/functional-tests/testcases/backends/backup-tasks.xml
File was deleted opends/tests/staf-tests/functional-tests/testcases/backends/backup-tasks/backup-tasks.xml
New file @@ -0,0 +1,134 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../../shared/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 ! ! Copyright 2009 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main_backup-tasks"/> <function name="main_backup-tasks" scope="local"> <sequence> <block name="'main_backup-tasks'"> <try> <sequence> <script> CurrentTestPath['group']='backends' CurrentTestPath['suite']='backup-tasks' __group=CurrentTestPath['group'] __groupdir='%s/testcases/%s' % (TESTS_DIR,__group) </script> <!--- Test Suite information #@TestSuiteName Backend Backup Tasks Tests #@TestSuitePurpose Verify that the basic backup task functionality is working in the Directory Server. #@TestSuiteID Backup Tasks Tests #@TestSuiteGroup Backup Tasks #@TestGroup Backend #@TestScript backup-tasks.xml #@TestHTMLLink http://opends.dev.java.net/ --> <call function="'testSuite_Preamble'"/> <try> <sequence> <call function="'common_setup'"> { 'quickStart' : False , 'startServer' : True , 'loadData' : False , 'stopServer' : False } </call> <!-- List of Backup Tasks of Test Functions --> <script> backupList=[] backupList.append('backup-tasks/backup-tasks_tests') </script> <!-- Import the files for this test suite --> <iterate var="__backup" in="backupList"> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/%s.xml' % (__groupdir,__backup)"/> </iterate> <!-- List of Test Cases --> <script> testsList=[] testsList.append('backends_backup_tasks_001') testsList.append('backends_backup_tasks_002') testsList.append('backends_backup_tasks_003') </script> <!-- Execute the Tests --> <iterate var="__test" in="testsList"> <sequence> <call function="'%s' % (__test)" /> </sequence> </iterate> </sequence> <catch exception="'STAFException.TestSuite.SetupException'"> <sequence> <message log="1" level="'fatal'"> 'Setup of test suite failed.' </message> <rethrow/> </sequence> </catch> <finally> <message>'Test Cases Completed.'</message> </finally> </try> </sequence> <finally> <sequence> <!-- Test Suite Cleanup --> <message>'Finally: Global Schema Cleanup.'</message> <try> <call function="'common_cleanup'" /> <catch exception="'STAFException'"> <sequence> <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message> </sequence> </catch> <finally> <call function="'testSuite_Postamble'"/> </finally> </try> </sequence> </finally> </try> </block> </sequence> </function> </stax> opends/tests/staf-tests/functional-tests/testcases/backends/backup-tasks/backup-tasks_tests.xml
New file @@ -0,0 +1,218 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../../shared/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 ! ! Copyright 2009 Sun Microsystems, Inc. ! --> <stax> <!--- Test Case information #@TestMarker Backend Backup Tasks Tests #@TestName Backup: Backup Tasks 001 #@TestID Backup Tasks 001 #@TestPurpose Schedule a Backup of the data in OpenDS and test the option completionNotify. #@TestPreamble #@TestSteps Client calls an online backup with completionNotify with an incorrect email address and with a correct email #@TestPostamble #@TestResult Success if backup returns 0 --> <function name="backends_backup_tasks_001" scope="local"> <testcase name="getTestCaseName('Create a backup task with --completionNotify')"> <try> <sequence> <call function="'testCase_Preamble'"/> <message> 'Backend Backup Tasks 001: Schedule a Backup task with --completionNotify incorrect email' </message> <call function="'backup'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'backupID' : 'scheduled-backup', 'schedulePattern' : '"0 15 * * 1-5"' , 'backupDir' : '%s/backends/' % remote.data , 'extraParams' : '--completionNotify foo' , 'expectedRC' : 1 } </call> <message> 'Backend Backup Tasks 001: Schedule a Backup task with --completionNotify correct email' </message> <call function="'backup'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'backupID' : 'scheduled-backup', 'schedulePattern' : '"0 15 * * 1-5"' , 'backupDir' : '%s/backends/' % remote.data , 'extraParams' : '--completionNotify foo@example.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 Backup Tasks Tests #@TestName Backup: Backup Tasks 002 #@TestID Backup Tasks 002 #@TestPurpose Schedule a Backup of the data in OpenDS and test the option errorNotify #@TestPreamble #@TestSteps Client calls an online backup with errorNotify with an incorrect email address and with a correct email #@TestPostamble #@TestResult Success if backup returns 0 --> <function name="backends_backup_tasks_002" scope="local"> <testcase name="getTestCaseName('Create a backup task with --errorNotify')"> <try> <sequence> <call function="'testCase_Preamble'"/> <message> 'Backend Backup Tasks 002: Schedule a Backup task with --errorNotify incorrect email' </message> <call function="'backup'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'backupID' : 'scheduled-backup-2', 'schedulePattern' : '"0 15 * * 1-5"' , 'backupDir' : '%s/backends/' % remote.data , 'extraParams' : '--errorNotify foo' , 'expectedRC' : 1 } </call> <message> 'Backend Backup Tasks 002: Schedule a Backup task with --errorNotify correct email' </message> <call function="'backup'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'backupID' : 'scheduled-backup-2', 'schedulePattern' : '"0 15 * * 1-5"' , 'backupDir' : '%s/backends/' % remote.data , 'extraParams' : '--errorNotify foo@example.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 Backup Tasks Tests #@TestName Backup: Backup Tasks 003 #@TestID Backup Tasks 003 #@TestPurpose Schedule a Backup of the data in OpenDS and test the option dependency #@TestPreamble #@TestSteps Client calls an online backup #@TestPostamble #@TestResult Success if backup returns 0 --> <function name="backends_backup_tasks_003" scope="local"> <testcase name="getTestCaseName('Create a backup task with --dependency')"> <try> <sequence> <call function="'testCase_Preamble'"/> <message> 'Backend Backup Tasks 003: Schedule a Backup task with --dependency incorrect' </message> <call function="'backup'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'backupID' : 'scheduled-backup-3', 'backupDir' : '%s/backends/' % remote.data , 'extraParams' : '--dependency foo' , 'expectedRC' : 1 } </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> </stax> opends/tests/staf-tests/functional-tests/testcases/backends/restore-tasks.xml
File was deleted opends/tests/staf-tests/functional-tests/testcases/backends/restore-tasks/restore-tasks.xml
New file @@ -0,0 +1,133 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../../shared/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 ! ! Copyright 2009 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main_restore-tasks"/> <function name="main_restore-tasks" scope="local"> <sequence> <block name="'main_restore-tasks'"> <try> <sequence> <script> CurrentTestPath['group']='backends' CurrentTestPath['suite']='restore-tasks' __group=CurrentTestPath['group'] __groupdir='%s/testcases/%s' % (TESTS_DIR,__group) </script> <!--- 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/ --> <call function="'testSuite_Preamble'"/> <try> <sequence> <call function="'common_setup'"> { 'quickStart' : False , 'startServer' : True , 'loadData' : False , 'stopServer' : False } </call> <!-- List of Restore Tasks of Test Functions --> <script> restoreList=[] restoreList.append('restore-tasks/restore-tasks_tests') </script> <!-- Import the files for this test suite --> <iterate var="__restore" in="restoreList"> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/%s.xml' % (__groupdir,__restore)"/> </iterate> <!-- List of Test Cases --> <script> testsList=[] testsList.append('backends_restore_tasks_001') testsList.append('backends_restore_tasks_002') </script> <!-- Execute the Tests --> <iterate var="__test" in="testsList"> <sequence> <call function="'%s' % (__test)" /> </sequence> </iterate> </sequence> <catch exception="'STAFException.TestSuite.SetupException'"> <sequence> <message log="1" level="'fatal'"> 'Setup of test suite failed.' </message> <rethrow/> </sequence> </catch> <finally> <message>'Test Cases Completed.'</message> </finally> </try> </sequence> <finally> <sequence> <!-- Test Suite Cleanup --> <message>'Finally: Global Schema Cleanup.'</message> <try> <call function="'common_cleanup'" /> <catch exception="'STAFException'"> <sequence> <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message> </sequence> </catch> <finally> <call function="'testSuite_Postamble'"/> </finally> </try> </sequence> </finally> </try> </block> </sequence> </function> </stax> opends/tests/staf-tests/functional-tests/testcases/backends/restore-tasks/restore-tasks_tests.xml
New file @@ -0,0 +1,185 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../../shared/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 ! ! Copyright 2008-2009 Sun Microsystems, Inc. ! --> <stax> <!--- Test Case information #@TestMarker Backend Restore Tasks Tests #@TestName Restore Tasks: Restore Tasks 001 #@TestID Restore Tasks 001 #@TestPurpose Create a restore task of the data in OpenDS and test the option completionNotify. #@TestPreamble #@TestSteps Client calls an online restore with completionNotify with an incorrect email address and with a correct email #@TestPostamble #@TestResult Success if OpenDS returns 0 --> <function name="backends_restore_tasks_001" scope="local"> <testcase name="getTestCaseName('Create a restore task with --completionNotify')"> <try> <sequence> <call function="'testCase_Preamble'"/> <message> 'Backend Restore Tasks 001: Create a backup of the data' </message> <call function="'backup'"> { 'backupDir' : '%s/backends/backup1' % remote.data , 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'extraParams' : '-y -c' } </call> <message> 'Backend Restore Tasks 001: Restore with --completionNotify incorrect email' </message> <call function="'restore'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'backupDir' : '%s/backends/backup1' % remote.data, 'extraParams' : '--completionNotify foo', 'expectedRC' : 1 } </call> <message> 'Backend Restore Tasks 001: Restore with --completionNotify correct email' </message> <call function="'restore'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'backupDir' : '%s/backends/backup1' % remote.data, 'extraParams' : '--completionNotify foo@example.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 Restore Tasks Tests #@TestName Restore Tasks: Restore Tasks 002 #@TestID Restore Tasks 002 #@TestPurpose Create a restore task of the data in OpenDS and test the option errorNotify. #@TestPreamble #@TestSteps Client calls an online restore with errorNotify with an incorrect email address and with a correct email #@TestPostamble #@TestResult Success if OpenDS returns 0 --> <function name="backends_restore_tasks_002" scope="local"> <testcase name="getTestCaseName('Create a restore task with --errorNotify')"> <try> <sequence> <call function="'testCase_Preamble'"/> <message> 'Backend Restore Tasks 002: Create a backup of the data' </message> <call function="'backup'"> { 'backupDir' : '%s/backends/backup2' % remote.data , 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'extraParams' : '-c -A' } </call> <message> 'Backend Restore Tasks 002: Restore with --errorNotify incorrect email' </message> <call function="'restore'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'backupDir' : '%s/backends/backup2' % remote.data, 'extraParams' : '--errorNotify foo', 'expectedRC' : 1 } </call> <message> 'Backend Restore Tasks 002: Restore with --errorNotify correct email' </message> <call function="'restore'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'backupDir' : '%s/backends/backup2' % remote.data, 'extraParams' : '--errorNotify foo@example.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> </stax>