2016N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2887N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
2016N/A<!--
2016N/A ! CDDL HEADER START
2016N/A !
2016N/A ! The contents of this file are subject to the terms of the
2016N/A ! Common Development and Distribution License, Version 1.0 only
2016N/A ! (the "License"). You may not use this file except in compliance
2016N/A ! with the License.
5826N/A !
2016N/A ! You can obtain a copy of the license at
5826N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt
5826N/A ! or http://forgerock.org/license/CDDLv1.0.html.
2016N/A ! See the License for the specific language governing permissions
2016N/A ! and limitations under the License.
5826N/A !
2016N/A ! When distributing Covered Code, include this CDDL HEADER in each
2016N/A ! file and include the License file at
5826N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt. If applicable,
2016N/A ! add the following below this CDDL HEADER, with the fields enclosed
2016N/A ! by brackets "[]" replaced with your own identifying information:
2016N/A ! Portions Copyright [yyyy] [name of copyright owner]
2016N/A !
2016N/A ! CDDL HEADER END
2016N/A !
6215N/A ! Copyright 2012-2013 ForgeRock AS.
2016N/A ! -->
2016N/A<stax>
2016N/A <defaultcall function="replication_schema"/>
5826N/A <function name="replication_schema" scope="local">
2016N/A <sequence>
5826N/A <block name="'replication_schema'">
5826N/A <try>
5826N/A <sequence>
6215N/A <script>
6215N/A if not CurrentTestPath.has_key('group'):
6215N/A CurrentTestPath['group']='replication'
5826N/A CurrentTestPath['suite'] = 'schema'
5803N/A
6219N/A _groupdir='%s/testcases/replication' % TESTS_DIR
5826N/A _label = 'Replication Schema'
5826N/A </script>
5803N/A
5826N/A <!--- Test Suite information
5826N/A #@TestSuiteName Replication Schema Tests
5826N/A #@TestSuitePurpose Verify that the total-update operations are replicated
5826N/A correctly between two servers.
5826N/A #@TestSuiteID Schema Tests
5826N/A #@TestSuiteGroup Schema
5826N/A #@TestGroup Replication
5826N/A #@TestScript replication_schema.xml
5826N/A #@TestHTMLLink http://www.forgerock.org/
5826N/A -->
5826N/A
5826N/A <call function="'testSuite_Preamble'"/>
5803N/A
5826N/A <try>
5826N/A <sequence>
5826N/A
5826N/A <import machine="STAF_LOCAL_HOSTNAME"
5826N/A file="'%s/testcases/replication/replication_setup.xml'
5826N/A % (TESTS_DIR)"/>
5826N/A <call function="'replication_setup'" >
5826N/A { 'label' : _label }
5826N/A </call>
5803N/A
5826N/A <!-- List of Import of Test Functions -->
5826N/A <script>
5826N/A importList=[]
5826N/A importList.append('schema/schema_tests')
5826N/A </script>
5803N/A
5826N/A <!-- Import the files for this test suite -->
5826N/A <iterate var="_import" in="importList">
5826N/A <import machine="STAF_LOCAL_HOSTNAME"
5826N/A file="'%s/%s.xml' % (_groupdir,_import)"/>
5826N/A </iterate>
2399N/A
5826N/A <!-- Specific to replication tests -->
5826N/A <script>
5826N/A msg1 = 'Replication: Schema:'
5826N/A synchroSuffix = master.getSynchronizedSuffixList()[0].getSuffixDn()
5826N/A
5826N/A currentSchemaFile = '%s/config/schema/99-user.ldif' % masterPath
5826N/A provSchemaFile = '%/last-99-user.ldif' % masterPath
5826N/A
5826N/A consumer = consumerList[0]
5826N/A consumerHost = consumer.getHostname()
5826N/A </script>
5826N/A
5826N/A <!-- List of Test Cases -->
5826N/A <script>
5826N/A testsList=[]
5826N/A testsList.append('replication_schema_001')
5826N/A testsList.append('replication_schema_002')
5826N/A testsList.append('replication_schema_003')
5826N/A testsList.append('replication_schema_004')
5826N/A testsList.append('replication_schema_005')
5826N/A testsList.append('replication_schema_006')
5826N/A testsList.append('replication_schema_007')
5826N/A testsList.append('replication_schema_008')
5826N/A </script>
5803N/A
5826N/A <!-- Execute the Tests -->
5826N/A <iterate var="__test" in="testsList">
5826N/A <sequence>
5826N/A <call function="'%s' % (__test)" />
5826N/A </sequence>
5826N/A </iterate>
2399N/A
5826N/A </sequence>
2399N/A
5826N/A <catch exception="'STAFException.TestSuite.SetupException'">
5826N/A <sequence>
5826N/A <message log="1" level="'fatal'">
5826N/A 'Setup of test suite failed.'
5826N/A </message>
5826N/A <rethrow/>
5826N/A </sequence>
5826N/A </catch>
5826N/A
5826N/A <finally>
5826N/A <message>'Test Cases Completed.'</message>
5826N/A </finally>
2399N/A
5826N/A </try>
2399N/A
5826N/A </sequence>
5826N/A
5826N/A <finally>
5826N/A <sequence>
5826N/A <!-- Test Suite Cleanup -->
5826N/A <message>'Finally: Replication Cleanup.'</message>
5826N/A <try>
5826N/A <sequence>
5826N/A <import machine="STAF_LOCAL_HOSTNAME"
5826N/A file="'%s/testcases/replication/replication_cleanup.xml'
5826N/A % (TESTS_DIR)"/>
5826N/A <call function="'replication_cleanup'">
5826N/A { 'label' : _label }
5826N/A </call>
5826N/A </sequence>
5826N/A <catch exception="'STAFException'">
5826N/A <sequence>
5826N/A <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
5826N/A </sequence>
5826N/A </catch>
5826N/A <finally>
5826N/A <call function="'testSuite_Postamble'"/>
5826N/A </finally>
5826N/A </try>
2399N/A </sequence>
5826N/A </finally>
5826N/A
5826N/A </try>
2016N/A </block>
2016N/A </sequence>
2016N/A </function>
2016N/A</stax>