| opendj-sdk/opends/tests/functional-tests/testcases/tasks/backup_db.xml | ●●●●● patch | view | raw | blame | history | |
| opendj-sdk/opends/tests/functional-tests/testcases/tasks/export-ldif.xml | ●●●●● patch | view | raw | blame | history | |
| opendj-sdk/opends/tests/functional-tests/testcases/tasks/import-ldif.xml | ●●●●● patch | view | raw | blame | history | |
| opendj-sdk/opends/tests/functional-tests/testcases/tasks/restart_db.xml | ●●●●● patch | view | raw | blame | history | |
| opendj-sdk/opends/tests/functional-tests/testcases/tasks/setup.xml | ●●●●● patch | view | raw | blame | history | |
| opendj-sdk/opends/tests/functional-tests/testcases/tasks/tasks.xml | ●●●●● patch | view | raw | blame | history |
opendj-sdk/opends/tests/functional-tests/testcases/tasks/backup_db.xml
@@ -157,16 +157,7 @@ <testcase name="getTestCaseName('schedule backup task for scheduled execution in asynchronous mode')"> <sequence> <call function="'testCase_Preamble'"/> <script> mydate=strftime("%Y%m%d%H%M%S",localtime()) </script> <message>'Wait ...'</message> <call function="'Sleep'"> { 'location' : STAF_REMOTE_HOSTNAME, 'sleepForMilliSeconds' : 90000 } </call> <call function="'backup'"> { 'location' : STAF_REMOTE_HOSTNAME , @@ -174,7 +165,7 @@ 'dsInstancePort' : DIRECTORY_INSTANCE_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'startTask' : '%s' % mydate, 'startTask' : '20061212000000', 'backupDir' : '%s/tasks/backup_schedule_asynchronous' % logsRemoteDataDir, 'backEnd' : 'userRoot'} </call> opendj-sdk/opends/tests/functional-tests/testcases/tasks/export-ldif.xml
@@ -91,11 +91,6 @@ <call function="'testPassed'"/> </else> </if> <script> mydate=strftime("%Y%m%d%H%M%S",localtime()) </script> <message>'mydate %s' % mydate</message> <call function="'testCase_Postamble'"/> </sequence> @@ -165,17 +160,7 @@ <testcase name="getTestCaseName('schedule export-ldif task for scheduled execution in asynchronous mode')"> <sequence> <call function="'testCase_Preamble'"/> <script> mydate=strftime("%Y%m%d%H%M%S",localtime()) </script> <message>'Wait ...'</message> <call function="'Sleep'"> { 'location' : STAF_REMOTE_HOSTNAME, 'sleepForMilliSeconds' : 90000 } </call> <call function="'exportLdif'"> { 'location' : STAF_REMOTE_HOSTNAME , @@ -184,7 +169,7 @@ 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'ldifFile' : '%s/tasks/export_schedule_asynchronous' % logsRemoteDataDir, 'startTask' : '%s' % mydate, 'startTask' : '20061212000000', 'backEnd' : 'userRoot'} </call> @@ -202,9 +187,18 @@ <else> <call function="'testPassed'"/> </else> </if> </if> <call function="'RestartDs'"> { 'dsHost' : DIRECTORY_INSTANCE_HOST, 'dsPort' : DIRECTORY_INSTANCE_PORT, 'dsBindDN' : DIRECTORY_INSTANCE_DN, 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> opendj-sdk/opends/tests/functional-tests/testcases/tasks/import-ldif.xml
@@ -162,6 +162,68 @@ <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend Import Tests #@TestName Backend: Import: LDIF Default #@TestID LDIF Default #@TestPurpose schedule a import-ldif in task mode to be executed in asynchronous mode #@TestPreamble #@TestSteps execute a import-ldif in a task #@TestSteps specify the -t option with the value non null to schedule an execution #@TestPostamble #@TestResult --> <testcase name="getTestCaseName('schedule import-ldif task for scheduled execution in asynchronous mode')"> <sequence> <call function="'testCase_Preamble'"/> <call function="'ImportLdifWithScript'"> { 'location' : STAF_REMOTE_HOSTNAME , 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST, 'dsInstancePort' : DIRECTORY_INSTANCE_PORT, 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD, 'dsLdifFile' : '%s/tasks/import.ldif' % logsRemoteDataDir, 'dsAppend' : ' ', 'startTask' : '20061212000000', 'dsBackEnd' : 'userRoot'} </call> <call function="'Sleep'"> { 'location' : STAF_REMOTE_HOSTNAME, 'sleepForMilliSeconds' : 90000 } </call> <!-- Check data are imported --> <call function="'checkImport'"> { 'expectedEntries' : ['uid=scarter,dc=example,dc=com', 'uid=tmorris, dc=example,dc=com'], 'startDS' : 'False' } </call> <!-- Delete entries --> <call function="'DeleteEntry'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : 'uid=scarter,dc=example,dc=com' } </call> <call function="'DeleteEntry'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : 'uid=tmorris,dc=example,dc=com' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'" /> </sequence> opendj-sdk/opends/tests/functional-tests/testcases/tasks/restart_db.xml
New file @@ -0,0 +1,147 @@ <?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 ! ! Portions Copyright 2006-2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="restart_db"/> <function name="restart_db" scope="local"> <block name="STAXCurrentFunction"> <sequence> <script> CurrentTestPath['suite']=STAXCurrentFunction </script> <call function="'testSuite_Preamble'" /> <!--- Test Suite information #@TestSuiteName Tasks #@TestSuitePurpose Verify that the restart functionality is working in mode task #@TestSuiteID restart Tests #@TestSuiteGroup restart #@TestGroup tasks #@TestScript restart.xml #@TestHTMLLink http://opends.dev.java.net/ --> <!--- Test Case information #@TestMarker Backend restart Tests #@TestName Backend: restart #@TestPurpose schedule a restart in task mode to be executed immedialy in asynchronous mode #@TestPreamble #@TestSteps execute a restart in a task #@TestSteps specify the -t option with the value non null to schedule an execution #@TestPostamble #@TestResult --> <testcase name="getTestCaseName('schedule restart task for scheduled execution in asynchronous mode')"> <sequence> <call function="'testCase_Preamble'"/> <call function="'StopDsWithScript'"> { 'location' : STAF_REMOTE_HOSTNAME, 'dsHost' : DIRECTORY_INSTANCE_HOST, 'dsPort' : DIRECTORY_INSTANCE_PORT, 'dsBindDN' : DIRECTORY_INSTANCE_DN, 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD, 'dsRestart' : ' ', 'dsStopTime' : '20061212000000' } </call> <call function="'Sleep'"> { 'location' : STAF_REMOTE_HOSTNAME, 'sleepForMilliSeconds' : 10000 } </call> <call function="'SearchObject'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : DIRECTORY_INSTANCE_SFX, 'dsFilter' : 'objectclass=*' , 'dsScope' : 'base', 'expectedRC' : 0 } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker Backend stop Tests #@TestName Backend: stop #@TestPurpose schedule a stop in task mode to be executed immedialy in asynchronous mode #@TestPreamble #@TestSteps execute a stop in a task #@TestSteps specify the -t option with the value non null to schedule an execution #@TestPostamble #@TestResult --> <testcase name="getTestCaseName('schedule stop server task for scheduled execution in asynchronous mode')"> <sequence> <call function="'testCase_Preamble'"/> <call function="'StopDsWithScript'"> { 'location' : STAF_REMOTE_HOSTNAME, 'dsHost' : DIRECTORY_INSTANCE_HOST, 'dsPort' : DIRECTORY_INSTANCE_PORT, 'dsBindDN' : DIRECTORY_INSTANCE_DN, 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD, 'dsStopTime' : '20061212000000' } </call> <call function="'SearchObject'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN, 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : DIRECTORY_INSTANCE_SFX, 'dsFilter' : 'objectclass=*' , 'dsScope' : 'base', 'expectedRC' : 91 } </call> <!--- Start DS --> <call function="'StartDsWithScript'"> { 'location' : STAF_REMOTE_HOSTNAME } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'" /> </sequence> </block> </function> </stax> opendj-sdk/opends/tests/functional-tests/testcases/tasks/setup.xml
@@ -71,13 +71,13 @@ 'noOfMilliSeconds' : 2000 } </call> <call function="'ldapSearchWithScript'"> { 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : 'dc=com' , 'dsFilter' : 'objectclass=*' } </call> <call function="'ldapSearchWithScript'"> { 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : 'dc=com' , 'dsFilter' : 'objectclass=*' } </call> </sequence> <!--- End Block DS Process Active --> opendj-sdk/opends/tests/functional-tests/testcases/tasks/tasks.xml
@@ -36,7 +36,7 @@ </script> <call function="'testGroup_Preamble'" /> <iterate var="_test" in="['setup','export-ldif','import-ldif','backup_db','restore_db','cleanup']" > <iterate var="_test" in="['setup','restart_db','export-ldif','import-ldif','backup_db','restore_db','cleanup']" > <sequence> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/tasks/%s.xml' % (TESTS_DIR,_test)"/>