restore-tasks_tests.xml revision 6982
768N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4752N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
768N/A<!--
768N/A ! CDDL HEADER START
768N/A !
768N/A ! The contents of this file are subject to the terms of the
768N/A ! Common Development and Distribution License, Version 1.0 only
768N/A ! (the "License"). You may not use this file except in compliance
768N/A ! with the License.
768N/A !
6982N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6982N/A ! or http://forgerock.org/license/CDDLv1.0.html.
768N/A ! See the License for the specific language governing permissions
768N/A ! and limitations under the License.
768N/A !
6982N/A ! When distributing Covered Code, include this CDDL HEADER in each
6982N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6982N/A ! If applicable, add the following below this CDDL HEADER, with the
6982N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6982N/A ! information:
768N/A ! Portions Copyright [yyyy] [name of copyright owner]
768N/A !
768N/A ! CDDL HEADER END
768N/A !
4618N/A ! Copyright 2008-2009 Sun Microsystems, Inc.
6184N/A ! Portions Copyright 2011-2013 ForgeRock AS.
768N/A ! -->
768N/A<stax>
4752N/A <!--- Test Case information
4752N/A #@TestMarker Backend Restore Tasks Tests
4752N/A #@TestName Restore Tasks: Restore Tasks 001
4752N/A #@TestID Restore Tasks 001
4752N/A #@TestPurpose Create a restore task of the data in OpenDS and test the
4752N/A option completionNotify.
4752N/A #@TestPreamble
4752N/A #@TestSteps Client calls an online restore with completionNotify
4752N/A with an incorrect email address and with a correct email
4752N/A #@TestPostamble
4752N/A #@TestResult Success if OpenDS returns 0
4752N/A -->
4752N/A
4752N/A <function name="backends_restore_tasks_001" scope="local">
4752N/A <testcase name="getTestCaseName('Create a restore task with --completionNotify')">
4752N/A <try>
4752N/A <sequence>
4752N/A
4752N/A <call function="'testCase_Preamble'"/>
4752N/A
4752N/A <message>
4752N/A 'Backend Restore Tasks 001: Create a backup of the data'
4752N/A </message>
4752N/A
4752N/A <call function="'backup'">
5508N/A { 'backupDir' : '%s/backends/backup1' % remote.temp ,
4752N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4752N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT ,
4752N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4752N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4752N/A 'extraParams' : '-y -c'
4752N/A }
4752N/A </call>
4752N/A
4752N/A <message>
4752N/A 'Backend Restore Tasks 001: Restore with --completionNotify incorrect email'
4752N/A </message>
4752N/A
4752N/A <call function="'restore'">
4752N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4752N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
4752N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4752N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5508N/A 'backupDir' : '%s/backends/backup1' % remote.temp,
4752N/A 'extraParams' : '--completionNotify foo',
4752N/A 'expectedRC' : 1
4752N/A }
4752N/A </call>
4752N/A
4752N/A <message>
4752N/A 'Backend Restore Tasks 001: Restore with --completionNotify correct email'
4752N/A </message>
4752N/A
4752N/A <call function="'restore'">
4752N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4752N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
4752N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4752N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5508N/A 'backupDir' : '%s/backends/backup1' % remote.temp,
6184N/A 'extraParams' : '--completionNotify foo@example.com'
4752N/A }
4752N/A </call>
4752N/A
4752N/A </sequence>
4752N/A
4752N/A <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
4752N/A <message log="1" level="'fatal'">
4752N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
4752N/A </message>
4752N/A </catch>
4752N/A
4752N/A <finally>
4752N/A <call function="'testCase_Postamble'"/>
4752N/A </finally>
4752N/A </try>
4752N/A </testcase>
768N/A </function>
4752N/A
4752N/A <!--- Test Case information
4752N/A #@TestMarker Backend Restore Tasks Tests
4752N/A #@TestName Restore Tasks: Restore Tasks 002
4752N/A #@TestID Restore Tasks 002
4752N/A #@TestPurpose Create a restore task of the data in OpenDS and test the
4752N/A option errorNotify.
4752N/A #@TestPreamble
4752N/A #@TestSteps Client calls an online restore with errorNotify
4752N/A with an incorrect email address and with a correct email
4752N/A #@TestPostamble
4752N/A #@TestResult Success if OpenDS returns 0
4752N/A -->
4752N/A
4752N/A <function name="backends_restore_tasks_002" scope="local">
4752N/A <testcase name="getTestCaseName('Create a restore task with --errorNotify')">
4752N/A <try>
4752N/A <sequence>
4752N/A
4752N/A <call function="'testCase_Preamble'"/>
4752N/A
4752N/A <message>
4752N/A 'Backend Restore Tasks 002: Create a backup of the data'
4752N/A </message>
4752N/A
4752N/A <call function="'backup'">
5508N/A { 'backupDir' : '%s/backends/backup2' % remote.temp ,
4752N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4752N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT ,
4752N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4752N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4752N/A 'extraParams' : '-c -A'
4752N/A }
4752N/A </call>
4752N/A
4752N/A <message>
4752N/A 'Backend Restore Tasks 002: Restore with --errorNotify incorrect email'
4752N/A </message>
4752N/A
4752N/A <call function="'restore'">
4752N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4752N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
4752N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4752N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5508N/A 'backupDir' : '%s/backends/backup2' % remote.temp,
4752N/A 'extraParams' : '--errorNotify foo',
4752N/A 'expectedRC' : 1
4752N/A }
4752N/A </call>
4752N/A
4752N/A <message>
4752N/A 'Backend Restore Tasks 002: Restore with --errorNotify correct email'
4752N/A </message>
4752N/A
4752N/A <call function="'restore'">
4752N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4752N/A 'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
4752N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
4752N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
5508N/A 'backupDir' : '%s/backends/backup2' % remote.temp,
4752N/A 'extraParams' : '--errorNotify foo@example.com'
4752N/A }
4752N/A </call>
4752N/A
4752N/A </sequence>
4752N/A
4752N/A <catch exception="'STAXException.*'" typevar="eType" var="eInfo">
4752N/A <message log="1" level="'fatal'">
4752N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
4752N/A </message>
4752N/A </catch>
4752N/A
4752N/A <finally>
4752N/A <call function="'testCase_Postamble'"/>
4752N/A </finally>
4752N/A </try>
4752N/A </testcase>
4752N/A </function>
4752N/A
768N/A</stax>