<?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 legal-notices/CDDLv1_0.txt
|
! or http://forgerock.org/license/CDDLv1.0.html.
|
! 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 legal-notices/CDDLv1_0.txt.
|
! 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 2012-2013 ForgeRock AS.
|
! -->
|
<stax>
|
<defaultcall function="replication_schema"/>
|
<function name="replication_schema" scope="local">
|
<sequence>
|
<block name="'replication_schema'">
|
<try>
|
<sequence>
|
<script>
|
if not CurrentTestPath.has_key('group'):
|
CurrentTestPath['group']='replication'
|
CurrentTestPath['suite'] = 'schema'
|
|
_groupdir='%s/testcases/replication' % TESTS_DIR
|
_label = 'Replication Schema'
|
</script>
|
|
<!--- Test Suite information
|
#@TestSuiteName Replication Schema Tests
|
#@TestSuitePurpose Verify that the total-update operations are replicated
|
correctly between two servers.
|
#@TestSuiteID Schema Tests
|
#@TestSuiteGroup Schema
|
#@TestGroup Replication
|
#@TestScript replication_schema.xml
|
#@TestHTMLLink http://www.forgerock.org/
|
-->
|
|
<call function="'testSuite_Preamble'"/>
|
|
<try>
|
<sequence>
|
|
<import machine="STAF_LOCAL_HOSTNAME"
|
file="'%s/testcases/replication/replication_setup.xml'
|
% (TESTS_DIR)"/>
|
<call function="'replication_setup'" >
|
{ 'label' : _label }
|
</call>
|
|
<!-- List of Import of Test Functions -->
|
<script>
|
importList=[]
|
importList.append('schema/schema_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>
|
|
<!-- Specific to replication tests -->
|
<script>
|
msg1 = 'Replication: Schema:'
|
synchroSuffix = master.getSynchronizedSuffixList()[0].getSuffixDn()
|
|
currentSchemaFile = '%s/config/schema/99-user.ldif' % masterPath
|
provSchemaFile = '%s/../last-99-user.ldif' % masterPath
|
|
consumer = consumerList[0]
|
consumerHost = consumer.getHostname()
|
</script>
|
|
<!-- List of Test Cases -->
|
<script>
|
testsList=[]
|
testsList.append('replication_schema_001')
|
testsList.append('replication_schema_002')
|
testsList.append('replication_schema_003')
|
testsList.append('replication_schema_004')
|
testsList.append('replication_schema_005')
|
testsList.append('replication_schema_006')
|
testsList.append('replication_schema_007')
|
testsList.append('replication_schema_008')
|
</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'">
|
{ 'label' : _label }
|
</call>
|
</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>
|