<?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.
! Portions Copyright 2011 ForgeRock AS.
! -->
<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.temp ,
'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.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 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.temp ,
'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.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>
<!--- 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.temp ,
'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>