externalchangelog.xml revision 36ff035d193caeb42752394debc9f78aeaef2206
<?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, include this CDDL HEADER in each
! file and include 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 ForgeRock AS.
! -->
<stax>
<defaultcall function="replication_externalchangelog"/>
<function name="replication_externalchangelog">
<sequence>
<!-- Do not run the tests if servers are split, as it is not supported
! by External Changelog to have RS separated from DS -->
<if expr="globalSplitServers == True">
<sequence>
<message>'External changelog not supported in replication split servers mode.'</message>
<message>'This test suite will not be run for this reason.'</message>
<return>0</return>
</sequence>
</if>
<block name="'externalchangelog'">
<try>
<sequence>
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group']='replication'
CurrentTestPath['suite']=STAXCurrentBlock
_group = 'replication'
_suite = 'externalchangelog'
_groupdir='%s/testcases/%s' % (TESTS_DIR,_group)
</script>
<call function="'testSuite_Preamble'"/>
<try>
<sequence>
<!--- Test Suite information
#@TestSuiteName Replication External Changelog Tests
#@TestSuitePurpose Test the event notification system provided by
the External Changelog.
#@TestSuiteID External Changelog Tests
#@TestSuiteGroup External Changelog
#@TestGroup Replication
#@TestScript replication_externalchangelog.xml
#@TestHTMLLink http://opends.dev.java.net/
-->
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/replication/replication_setup.xml'
% (TESTS_DIR)"/>
<call function="'replication_setup'"/>
<script>
ecl_modes=[]
ecl_modes.append('opends')
ecl_modes.append('draft')
</script>
<iterate var="ecl_mode" in="ecl_modes">
<sequence>
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/%s/%s/%s_common_ecl_tests.xml'
% (TESTS_DIR, _group, _suite, _suite)"/>
<call function="'common_ecl_tests'">
{ 'ecl_mode' : ecl_mode }
</call>
</sequence>
</iterate>
<!-- List of Import of Test Functions -->
<script>
importList=[]
importList.append('externalchangelog/externalchangelog_consistency_tests')
</script>
<!-- Import the files for this test suite -->
<iterate var="__import" in="importList">
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/%s.xml' % (_groupdir,__import)"/>
</iterate>
<!-- List of Test Cases -->
<script>
ecl_purge_delay = '120'
# Globals for cookies, changenumbers, lastchangenumbers
global_cookiesList=STAXGlobal([])
global_cnsList=STAXGlobal([])
global_lcnsList=STAXGlobal([])
# List of tests to run
testsList=[]
testsList.append('ecl_setup')
testsList.append('ecl_add_cookies_001')
testsList.append('ecl_mod_cookies_001')
testsList.append('ecl_changenumbers_001')
testsList.append('ecl_draft_cookies_001')
testsList.append('ecl_cookies_001')
testsList.append('ecl_draft_changenumbers_001')
testsList.append('ecl_cookies_002')
testsList.append('ecl_draft_changenumbers_002')
testsList.append('ecl_cookies_003')
testsList.append('ecl_draft_changenumbers_003')
testsList.append('ecl_purge_sleep_001')
testsList.append('ecl_purge_001')
testsList.append('ecl_purge_002')
testsList.append('ecl_purge_003')
testsList.append('ecl_purge_004')
testsList.append('ecl_purge_005')
testsList.append('ecl_cleanup')
</script>
<!-- Execute the Tests -->
<iterate var="__test" in="testsList">
<sequence>
<call function="'%s' % (__test)" />
</sequence>
</iterate>
</sequence>
<catch exception="'STAFException.TestSuite.SetupException'">
<sequence>
<message log="1" level="'fatal'">
'Setup of test suite failed.'
</message>
<rethrow/>
</sequence>
</catch>
<finally>
<message>'Test Cases Completed.'</message>
</finally>
</try>
</sequence>
<finally>
<sequence>
<!-- Test Suite Cleanup -->
<message>'Finally: Replication Cleanup.'</message>
<try>
<sequence>
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/replication/replication_cleanup.xml'
% (TESTS_DIR)"/>
<call function="'replication_cleanup'" />
</sequence>
<catch exception="'STAFException'">
<sequence>
<message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
</sequence>
</catch>
<finally>
<call function="'testSuite_Postamble'"/>
</finally>
</try>
</sequence>
</finally>
</try>
</block>
</sequence>
</function>
</stax>