restore-tasks_tests.xml revision 75e4d72341a69fa125aeab6e326e49a5422a9eac
<?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.
! Portions Copyright 2011-2013 ForgeRock AS.
! -->
<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.temp ,
'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.temp,
'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.temp,
'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.temp ,
'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.temp,
'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.temp,
'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>