3338N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
3338N/A ! The contents of this file are subject to the terms of the 3338N/A ! Common Development and Distribution License, Version 1.0 only 3338N/A ! (the "License"). You may not use this file except in compliance 3338N/A ! See the License for the specific language governing permissions 3338N/A ! and limitations under the License. 6982N/A ! When distributing Covered Code, include this CDDL HEADER in each 6982N/A ! If applicable, add the following below this CDDL HEADER, with the 6982N/A ! fields enclosed by brackets "[]" replaced with your own identifying 3338N/A ! Portions Copyright [yyyy] [name of copyright owner] 4618N/A ! Copyright 2008-2009 Sun Microsystems, Inc. 3338N/A <
defaultcall function="clu_manage-tasks_checkbehavior"/>
3338N/A <
function name="clu_manage-tasks_checkbehavior">
3338N/A <
block name="'clu_manage-tasks_checkbehavior'">
4618N/A <!--- Test Suite information 4618N/A #@TestSuiteName manage-tasks check behavior tests 4618N/A #@TestSuitePurpose Test the results of the manage-tasks command. 4618N/A #@TestSuiteGroup manage-tasks check behavior tests 4618N/A CurrentTestPath['group'] = 'clu'
4618N/A CurrentTestPath['suite'] = STAXCurrentBlock
4618N/A <
call function="'testSuite_Preamble'"/>
4618N/A <
call function="'common_setup'">
4618N/A 'allowPreEncodePassword' : True
4618N/A <!--- Define default value for template --> 4618N/A <!--- Test Case information 4618N/A #@TestMarker manage-tasks check behavior tests 4618N/A #@TestName manage-tasks: summary of tasks 4618N/A #@TestPurpose Test manage-tasks with summary option 4618N/A #@TestStep Do an manage-tasks with -s option. 4618N/A #@TestStep Check that task 125 and 126 are displayed. 4618N/A #@TestResult Success if manage-tasks returns 0 and if the 4618N/A <
testcase name="getTestCaseName 4618N/A ('manage-tasks: get summary of tasks')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A 'manage-tasks: create two tasks with taskID 125 and 126'
4618N/A <
call function="'ldapModifyWithScript'">
4618N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'manage-tasks: check that these tasks appear in the summary'
4618N/A <
call function="'manage-tasks'">
4618N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A returnString = STAXResult[0][1]
4618N/A msg1 = '125 Disconnect Client Completed with errors'
4618N/A msg2 = '126 Disconnect Client Waiting on start time'
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A <!--- Test Case information 4618N/A #@TestMarker manage-tasks check behavior tests 4618N/A #@TestName manage-tasks: info option 4618N/A #@TestPurpose Test manage-tasks with info option 4618N/A #@TestStep Do an manage-tasks with -i option on task 125. 4618N/A #@TestStep Check some information for task 125. 4618N/A #@TestStep Do an manage-tasks with -i option on task 126. 4618N/A #@TestStep Check some information for task 126. 4618N/A #@TestResult Success if manage-tasks returns 0 and if the 4618N/A <
testcase name="getTestCaseName 4618N/A ('manage-tasks: get task information')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A 'manage-tasks: get information for task 125'
4618N/A <
call function="'manage-tasks'">
4618N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A returnString = STAXResult[0][1]
4618N/A msg2 = 'Type Disconnect Client'
4618N/A msg3 = 'Status Completed with errors'
4618N/A msg4 = 'Scheduled Start Time Immediate execution'
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A 'manage-tasks: get information for task 126'
4618N/A <
call function="'manage-tasks'">
4618N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A returnString = STAXResult[0][1]
4618N/A msg2 = 'Type Disconnect Client'
4618N/A msg3 = 'Status Waiting on start time'
4618N/A msg4 = 'Scheduled Start Time Dec 12, 2048 12:00:00 AM'
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A <!--- Test Case information 4618N/A #@TestMarker manage-tasks check behavior tests 4618N/A #@TestName manage-tasks: cancel option 4618N/A #@TestPurpose Test manage-tasks with cancel option 4618N/A #@TestStep Do an manage-tasks with -c option on task 125. 4618N/A #@TestStep Check the output of the previous command. 4618N/A #@TestStep Do an manage-tasks with -c option on task 126. 4618N/A #@TestStep Check the output of the previous command. 4618N/A #@TestResult Success if manage-tasks return 1 for task 125, 4618N/A 0 for task 126 and if the outputs are correct. 4618N/A <
testcase name="getTestCaseName('manage-tasks: cancel task')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A 'manage-tasks: cancel the task 125'
4618N/A <
call function="'manage-tasks'">
4618N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A returnString = STAXResult[0][1]
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A 'expectedString' : 'task 125 is not in a cancelable state'
4618N/A 'manage-tasks: cancel the task 126'
4618N/A <
call function="'manage-tasks'">
4618N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A returnString = STAXResult[0][1]
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A 'expectedString' : 'Task 126 canceled'
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A <!--- Test Case information 4618N/A #@TestMarker manage-tasks check behavior tests 4618N/A #@TestName manage-tasks: invalid task 4618N/A #@TestPurpose Test manage-tasks with an invalid task 4618N/A #@TestStep Do an manage-tasks with -c option and an 4618N/A #@TestStep Check the output of the previous command. 4618N/A #@TestStep Do an manage-tasks with -i option and an 4618N/A #@TestStep Check the output of the previous command. 4618N/A #@TestResult Success if manage-tasks return 1 and if 4618N/A <
testcase name="getTestCaseName('manage-tasks: invalid task')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A 'manage-tasks: information for an invalid task'
4618N/A <
call function="'manage-tasks'">
4618N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A returnString = STAXResult[0][1]
4618N/A msg1 = 'Error canceling task \'124\': There are no tasks'
4618N/A msg2 = 'defined with ID \'124\''
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A 'expectedString' : '%s %s' % (msg1, msg2)
4618N/A 'manage-tasks: information on an invalid task'
4618N/A <
call function="'manage-tasks'">
4618N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A returnString = STAXResult[0][1]
4618N/A <
call function="'checktestString'">
4618N/A 'returnString' : returnString ,
4618N/A 'expectedString' : '%s %s' % (msg1, msg2)
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A <!-- Test Suite Cleanup --> 4618N/A <
message>'Finally: Global CLU Cleanup.'</
message>
4618N/A <
call function="'common_cleanup'" />
4618N/A <
catch exception="'STAFException'">
4618N/A <
message log="1" level="'fatal'">'Cleanup of test suite failed.'</
message>
4618N/A <
call function="'testSuite_Postamble'"/>