backup-tasks_tests.xml revision 5508
446N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4744N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
446N/A<!--
446N/A ! CDDL HEADER START
446N/A !
446N/A ! The contents of this file are subject to the terms of the
446N/A ! Common Development and Distribution License, Version 1.0 only
446N/A ! (the "License"). You may not use this file except in compliance
446N/A ! with the License.
446N/A !
446N/A ! You can obtain a copy of the license at
446N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
446N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
446N/A ! See the License for the specific language governing permissions
446N/A ! and limitations under the License.
446N/A !
446N/A ! When distributing Covered Code, exclude this CDDL HEADER in each
446N/A ! file and exclude the License file at
446N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
446N/A ! add the following below this CDDL HEADER, with the fields enclosed
873N/A ! by brackets "[]" replaced with your own identifying information:
446N/A ! Portions Copyright [yyyy] [name of copyright owner]
446N/A !
446N/A ! CDDL HEADER END
446N/A !
5073N/A ! Copyright 2009 Sun Microsystems, Inc.
446N/A ! Portions Copyright 2011 ForgeRock AS.
446N/A ! -->
446N/A<stax>
4744N/A <!--- Test Case information
4744N/A #@TestMarker Backend Backup Tasks Tests
4744N/A #@TestName Backup: Backup Tasks 001
4744N/A #@TestID Backup Tasks 001
4744N/A #@TestPurpose Schedule a Backup of the data in OpenDS and test the
4744N/A option completionNotify.
4744N/A #@TestPreamble
4744N/A #@TestSteps Client calls an online backup with completionNotify with
4744N/A an incorrect email address and with a correct email
4744N/A #@TestPostamble
4744N/A #@TestResult Success if backup returns 0
4744N/A -->
4744N/A
4744N/A <function name="backends_backup_tasks_001" scope="local">
4744N/A <testcase name="getTestCaseName('Create a backup task with --completionNotify')">
4744N/A <try>
4744N/A <sequence>
4744N/A <call function="'testCase_Preamble'"/>
4744N/A
4744N/A <message>
4744N/A 'Backend Backup Tasks 001: Schedule a Backup task with --completionNotify incorrect email'
4744N/A </message>
5073N/A
4744N/A <call function="'backup'">
5073N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4744N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
4744N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4744N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4744N/A 'backupID' : 'scheduled-backup',
4744N/A 'schedulePattern' : '"0 15 * * 1-5"' ,
957N/A 'backupDir' : '%s/backends/' % remote.temp ,
4744N/A 'extraParams' : '--completionNotify foo' ,
4744N/A 'expectedRC' : 1
4744N/A }
4744N/A </call>
4744N/A
4744N/A
4744N/A <message>
4744N/A 'Backend Backup Tasks 001: Schedule a Backup task with --completionNotify correct email'
4744N/A </message>
4744N/A
4744N/A <call function="'backup'">
4744N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4744N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
4744N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4744N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4744N/A 'backupID' : 'scheduled-backup',
4744N/A 'schedulePattern' : '"0 15 * * 1-5"' ,
4744N/A 'backupDir' : '%s/backends/' % remote.temp ,
4744N/A 'extraParams' : '--completionNotify foo@example.com'
4744N/A }
4744N/A </call>
4744N/A
4744N/A </sequence>
4744N/A
4744N/A <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
4744N/A <message log="1" level="'fatal'">
4744N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
4744N/A </message>
4744N/A </catch>
4744N/A
4744N/A <finally>
4744N/A <call function="'testCase_Postamble'"/>
4744N/A </finally>
4744N/A </try>
4744N/A </testcase>
4744N/A </function>
4744N/A
4744N/A <!--- Test Case information
4744N/A #@TestMarker Backend Backup Tasks Tests
4744N/A #@TestName Backup: Backup Tasks 002
4744N/A #@TestID Backup Tasks 002
4744N/A #@TestPurpose Schedule a Backup of the data in OpenDS and test the
4618N/A option errorNotify
4744N/A #@TestPreamble
4744N/A #@TestSteps Client calls an online backup with errorNotify
4744N/A with an incorrect email address and with a correct email
4744N/A #@TestPostamble
4744N/A #@TestResult Success if backup returns 0
4744N/A -->
4744N/A
4744N/A <function name="backends_backup_tasks_002" scope="local">
4744N/A <testcase name="getTestCaseName('Create a backup task with --errorNotify')">
4744N/A <try>
4744N/A <sequence>
4744N/A
4744N/A <call function="'testCase_Preamble'"/>
4744N/A
4744N/A <message>
4744N/A 'Backend Backup Tasks 002: Schedule a Backup task with --errorNotify incorrect email'
4744N/A </message>
4744N/A
4744N/A <call function="'backup'">
4744N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5073N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
4744N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
5073N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4744N/A 'backupID' : 'scheduled-backup-2',
4744N/A 'schedulePattern' : '"0 15 * * 1-5"' ,
4744N/A 'backupDir' : '%s/backends/' % remote.temp ,
4744N/A 'extraParams' : '--errorNotify foo' ,
4744N/A 'expectedRC' : 1
4744N/A }
4744N/A </call>
4744N/A
4744N/A
4744N/A <message>
4744N/A 'Backend Backup Tasks 002: Schedule a Backup task with --errorNotify correct email'
4744N/A </message>
4744N/A
4744N/A <call function="'backup'">
4744N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4744N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
4744N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4744N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4744N/A 'backupID' : 'scheduled-backup-2',
4744N/A 'schedulePattern' : '"0 15 * * 1-5"' ,
4744N/A 'backupDir' : '%s/backends/' % remote.temp ,
4744N/A 'extraParams' : '--errorNotify foo@example.com'
4744N/A }
4744N/A </call>
4744N/A
4744N/A </sequence>
4744N/A
4744N/A <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
4744N/A <message log="1" level="'fatal'">
4744N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
4744N/A </message>
4744N/A </catch>
4744N/A
4744N/A <finally>
4744N/A <call function="'testCase_Postamble'"/>
4744N/A </finally>
4744N/A </try>
4744N/A </testcase>
4744N/A </function>
4744N/A
4744N/A <!--- Test Case information
4744N/A #@TestMarker Backend Backup Tasks Tests
4744N/A #@TestName Backup: Backup Tasks 003
4744N/A #@TestID Backup Tasks 003
4744N/A #@TestPurpose Schedule a Backup of the data in OpenDS and test the
4744N/A option dependency
4744N/A #@TestPreamble
4744N/A #@TestSteps Client calls an online backup
4744N/A #@TestPostamble
4744N/A #@TestResult Success if backup returns 0
4744N/A -->
4744N/A
4744N/A <function name="backends_backup_tasks_003" scope="local">
4744N/A <testcase name="getTestCaseName('Create a backup task with --dependency')">
5073N/A <try>
4744N/A <sequence>
5073N/A
4744N/A <call function="'testCase_Preamble'"/>
4744N/A
4744N/A <message>
4744N/A 'Backend Backup Tasks 003: Schedule a Backup task with --dependency incorrect'
4744N/A </message>
4744N/A
4744N/A <call function="'backup'">
4744N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4744N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
4744N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4744N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
4744N/A 'backupID' : 'scheduled-backup-3',
4744N/A 'backupDir' : '%s/backends/' % remote.temp ,
4744N/A 'extraParams' : '--dependency foo' ,
4744N/A 'expectedRC' : 1
4744N/A }
4744N/A </call>
4744N/A
4744N/A
4744N/A </sequence>
4744N/A
4744N/A <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
4744N/A <message log="1" level="'fatal'">
4744N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
4744N/A </message>
4744N/A </catch>
4744N/A
4744N/A <finally>
4744N/A <call function="'testCase_Postamble'"/>
4744N/A </finally>
4744N/A </try>
4744N/A </testcase>
4618N/A </function>
4744N/A
4744N/A
4744N/A</stax>
4744N/A