1N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
1N/A ! The contents of this file are subject to the terms of the 1N/A ! Common Development and Distribution License, Version 1.0 only 1N/A ! (the "License"). You may not use this file except in compliance 1N/A ! You can obtain a copy of the license at 1N/A ! See the License for the specific language governing permissions 1N/A ! and limitations under the License. 1N/A ! When distributing Covered Code, exclude this CDDL HEADER in each 1N/A ! file and exclude the License file at 1N/A ! add the following below this CDDL HEADER, with the fields enclosed 1N/A ! by brackets "[]" replaced with your own identifying information: 1N/A ! Portions Copyright [yyyy] [name of copyright owner] ! Copyright 2008 Sun Microsystems, Inc. <
defaultcall function="main_restore"/>
<
function name="main_restore">
CurrentTestPath['group']='backends'
CurrentTestPath['suite']=STAXCurrentBlock
<
call function="'testSuite_Preamble'"/>
<!--- Test Suite information #@TestSuiteName Backend Restore Tests #@TestSuitePurpose Test the restore functionality for OpenDS. #@TestSuiteID Restore Tests <
import machine="STAF_LOCAL_HOSTNAME" <
call function="'backend_setup'">
'Create a backup of the data in OpenDS to be used in the restore testcase'
<
call function="'backup'">
<
call function="'checktestRC'">
<!--- Test Case information #@TestMarker Backend Restore Tests #@TestName Export: Restore 1 #@TestPurpose Restore data to OpenDS. #@TestSteps Client calls restore with the parameters default backendID, and backupDirectory #@TestResult Success if restore returns 0 <
testcase name="getTestCaseName('Test 1')">
<
call function="'testCase_Preamble'"/>
'Backend Restore1: Restore data to OpenDS'
<
call function="'StopDsWithScript'">
{ 'location' : STAF_REMOTE_HOSTNAME,
'dsHost' : DIRECTORY_INSTANCE_HOST,
'dsPort' : DIRECTORY_INSTANCE_PORT,
'dsBindDN' : DIRECTORY_INSTANCE_DN,
'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
<
call function="'checkRC'">
<
call function="'restore'">
<
call function="'checktestRC'">
'Start DS to run on port %s' % DIRECTORY_INSTANCE_PORT
<
call function="'StartDsWithScript'">
{ 'location' : STAF_REMOTE_HOSTNAME }
<
call function="'checkRC'">
<!--- Check that DS started --> <
call function="'isAlive'">
'noOfMilliSeconds' : 2000
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Backend Restore Tests #@TestName Export: Restore 2 #@TestPurpose Restore compressed data to OpenDS. #@TestSteps Client calls restore with the parameters default backendID, backupDirectory, and uncompress #@TestResult Success if restore returns 0 <
testcase name="getTestCaseName('Test 2')">
<
call function="'testCase_Preamble'"/>
'Backend Restore2: Restore compressed data to OpenDS'
<
call function="'StopDsWithScript'">
{ 'location' : STAF_REMOTE_HOSTNAME,
'dsHost' : DIRECTORY_INSTANCE_HOST,
'dsPort' : DIRECTORY_INSTANCE_PORT,
'dsBindDN' : DIRECTORY_INSTANCE_DN,
'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
<
call function="'checkRC'">
<
call function="'backup'">
<
call function="'checktestRC'">
'Start DS to run on port %s' % DIRECTORY_INSTANCE_PORT
<
call function="'StartDsWithScript'">
{ 'location' : STAF_REMOTE_HOSTNAME }
<
call function="'checkRC'">
<!--- Check that DS started --> <
call function="'isAlive'">
'noOfMilliSeconds' : 2000
<
call function="'testCase_Postamble'" />
<
import machine="STAF_LOCAL_HOSTNAME" <
call function="'backend_cleanup'"> { 'stopDS' : True } </
call>
<
call function="'testSuite_Postamble'" />