5826N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5826N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
5826N/A<!--
5826N/A ! CDDL HEADER START
5826N/A !
5826N/A ! The contents of this file are subject to the terms of the
5826N/A ! Common Development and Distribution License, Version 1.0 only
5826N/A ! (the "License"). You may not use this file except in compliance
5826N/A ! with the License.
5826N/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.
5826N/A ! See the License for the specific language governing permissions
5826N/A ! and limitations under the License.
5826N/A !
5826N/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:
5826N/A ! Portions Copyright [yyyy] [name of copyright owner]
5826N/A !
5826N/A ! CDDL HEADER END
5826N/A !
5826N/A ! Copyright 2007-2008 Sun Microsystems, Inc.
5826N/A ! Portions Copyright 2011-2012 ForgeRock AS.
5826N/A ! -->
5826N/A<stax>
5826N/A
5826N/A <!--- Test Case information
5826N/A #@TestMarker Replication Schema Replication Tests
5826N/A #@TestName Replication: Schema Replication: Add objectclass
5826N/A #@TestID Add objectclass
5826N/A #@TestPurpose Check schema replication when a new objectclass
5826N/A is added
5826N/A #@TestPreamble Load entries
5826N/A #@TestSteps Add new objectclass definition on server1
5826N/A #@TestSteps Add entry of new objectclass on server2
5826N/A #@TestPostamble
5826N/A #@TestResult Success if schema add and entry add replicated
5826N/A -->
5826N/A <function name="replication_schema_001" scope="local">
5826N/A <testcase name="getTestCaseName('Add objectclass')">
5826N/A <sequence>
5826N/A <try>
5826N/A <sequence>
5826N/A
5826N/A <call function="'testCase_Preamble'"/>
5826N/A
5826N/A <message>
5826N/A 'Test Name = %s' % STAXCurrentTestcase
5826N/A </message>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Check schema replication when a new objectclass is added.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Load entries into "master" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Load entries into "master" server -->
5826N/A <call function="'addEntry'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : masterHost,
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : master.getRootDn(),
5826N/A 'dsInstancePswd' : master.getRootPwd(),
5826N/A 'entryToBeAdded' : '%s/replication/Example.ldif' % \
5826N/A clientDataDir
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Add new object class.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A newObjectclass = '( testobjectclass-oid NAME \'testobjectclass-0\' SUP person MAY ( street $ c ) X-ORIGIN \'user defined\' )'
5826N/A </script>
5826N/A
5826N/A <!-- Modify schema in "master" server -->
5826N/A <call function="'modifyAnAttribute'">
5826N/A { 'dsPath' : masterPath,
5826N/A 'dsInstanceHost' : masterHost ,
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : master.getRootDn(),
5826N/A 'dsInstancePswd' : master.getRootPwd(),
5826N/A 'DNToModify' : 'cn=schema',
5826N/A 'attributeName' : 'objectClasses',
5826N/A 'newAttributeValue' : newObjectclass,
5826N/A 'changetype' : 'add'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Add entry to "consumer" server using new objectclass.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Add entry to "consumer" server -->
5826N/A <call function="'addEntry'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : consumerHost,
5826N/A 'dsInstancePort' : consumer.getPort(),
5826N/A 'dsInstanceDn' : consumer.getRootDn(),
5826N/A 'dsInstancePswd' : consumer.getRootPwd(),
5826N/A 'entryToBeAdded' : '%s/replication/testuser-0.ldif' % \
5826N/A clientDataDir
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the schema among the servers
5826N/A in the topology -->
5826N/A <call function="'verifySchemas'">
5826N/A [ clientHost, clientPath, master, consumerList, '99-user.ldif' ]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the trees among the servers in
5826N/A the topology -->
5826N/A <call function="'verifyTrees'">
5826N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
5826N/A </call>
5826N/A
5826N/A </sequence>
5826N/A
5826N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5826N/A <message log="1" level="'fatal'">
5826N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5826N/A </message>
5826N/A </catch>
5826N/A <finally>
5826N/A <sequence>
5826N/A <call function="'testCase_Postamble'"/>
5826N/A </sequence>
5826N/A </finally>
5826N/A </try>
5826N/A </sequence>
5826N/A </testcase>
5826N/A </function>
5826N/A
5826N/A
5826N/A
5826N/A
5826N/A <!--- Test Case information
5826N/A #@TestMarker Replication Schema Replication Tests
5826N/A #@TestName Replication: Schema Replication:
5826N/A Add attributetype
5826N/A #@TestID Add attributetype
5826N/A #@TestPurpose Check schema replication when a new
5826N/A attributetype is added
5826N/A #@TestPreamble
5826N/A #@TestSteps Add new attributeType and new objectclass
5826N/A definition on server1
5826N/A #@TestSteps Add new entry containing new objectclass and
5826N/A new attributeType on server2
5826N/A #@TestPostamble
5826N/A #@TestResult Success if schema add and entry adds replicated
5826N/A -->
5826N/A <function name="replication_schema_002" scope="local">
5826N/A <testcase name="getTestCaseName('Add attributetype')">
5826N/A <sequence>
5826N/A <try>
5826N/A <sequence>
5826N/A
5826N/A <call function="'testCase_Preamble'"/>
5826N/A
5826N/A <message>
5826N/A 'Test Name = %s' % STAXCurrentTestcase
5826N/A </message>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Check schema replication when a new Attributetype is added.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A newObjectclass = '( testobjectclass1-oid NAME \'testobjectclass-1\' SUP person MAY ( street $ testattribute-1 $ c ) X-ORIGIN \'user defined\' )'
5826N/A newAttributetype = '( testattribute1-oid NAME \'testattribute-1\' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN \'user defined\' )'
5826N/A </script>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Add newAttributetype in "master" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify schema in "master" server -->
5826N/A <call function="'modifyAnAttribute'">
5826N/A { 'dsPath' : masterPath,
5826N/A 'dsInstanceHost' : masterHost ,
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : master.getRootDn(),
5826N/A 'dsInstancePswd' : master.getRootPwd(),
5826N/A 'DNToModify' : 'cn=schema',
5826N/A 'attributeName' : 'attributeTypes',
5826N/A 'newAttributeValue' : newAttributetype,
5826N/A 'changetype' : 'add'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Add newObjectclass in "master" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <call function="'modifyAnAttribute'">
5826N/A { 'dsPath' : masterPath,
5826N/A 'dsInstanceHost' : masterHost ,
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : master.getRootDn(),
5826N/A 'dsInstancePswd' : master.getRootPwd(),
5826N/A 'DNToModify' : 'cn=schema',
5826N/A 'attributeName' : 'objectClasses',
5826N/A 'newAttributeValue' : newObjectclass,
5826N/A 'changetype' : 'add'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Add entry to "consumer" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Add entry to "consumer" server -->
5826N/A <call function="'addEntry'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : consumerHost,
5826N/A 'dsInstancePort' : consumer.getPort(),
5826N/A 'dsInstanceDn' : consumer.getRootDn(),
5826N/A 'dsInstancePswd' : consumer.getRootPwd(),
5826N/A 'entryToBeAdded' : '%s/replication/testuser-1.ldif' % \
5826N/A clientDataDir
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the schema among the servers in
5826N/A the topology -->
5826N/A <call function="'verifySchemas'">
5826N/A [ clientHost, clientPath, master, consumerList, '99-user.ldif' ]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the trees among the servers in
5826N/A the topology -->
5826N/A <call function="'verifyTrees'">
5826N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
5826N/A </call>
5826N/A
5826N/A </sequence>
5826N/A
5826N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5826N/A <message log="1" level="'fatal'">
5826N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5826N/A </message>
5826N/A </catch>
5826N/A <finally>
5826N/A <sequence>
5826N/A <call function="'testCase_Postamble'"/>
5826N/A </sequence>
5826N/A </finally>
5826N/A </try>
5826N/A </sequence>
5826N/A </testcase>
5826N/A </function>
5826N/A
5826N/A
5826N/A
5826N/A <!-- Test Case information
5826N/A #@TestMarker Replication Schema Replication Tests
5826N/A #@TestName Replication: Schema Replication:
5826N/A Delete objectclass
5826N/A #@TestID Delete objectclass
5826N/A #@TestPurpose Check schema replication when an objectclass
5826N/A is deleted
5826N/A #@TestPreamble
5826N/A #@TestSteps Remove user-defined objectclass definition on
5826N/A server1
5826N/A #@TestSteps Delete entry on server1
5826N/A #@TestSteps Add entry containing removed objectclass on
5826N/A every server
5826N/A #@TestPostamble
5826N/A #@TestResult Success if schema remove replicated and last
5826N/A entry add rejected on all servers (error 65:
5826N/A objectclass violation)
5826N/A -->
5826N/A <function name="replication_schema_003" scope="local">
5826N/A <testcase name="getTestCaseName('Delete objectclass')">
5826N/A <sequence>
5826N/A <try>
5826N/A <sequence>
5826N/A
5826N/A <call function="'testCase_Preamble'"/>
5826N/A
5826N/A <message>
5826N/A 'Test Name = %s' % STAXCurrentTestcase
5826N/A </message>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Check schema replication when an objectclass is deleted.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A newObjectclass = '( testobjectclass-oid NAME \'testobjectclass-0\' SUP person MAY ( street $ c ) X-ORIGIN \'user defined\' )'
5826N/A </script>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Delete newObjectclass in "master" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify schema in "master" server -->
5826N/A <call function="'modifyAnAttribute'">
5826N/A { 'dsPath' : masterPath,
5826N/A 'dsInstanceHost' : masterHost ,
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : master.getRootDn(),
5826N/A 'dsInstancePswd' : master.getRootPwd(),
5826N/A 'DNToModify' : 'cn=schema',
5826N/A 'attributeName' : 'objectClasses',
5826N/A 'newAttributeValue' : newObjectclass,
5826N/A 'changetype' : 'delete'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Delete previously added entry.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Delete previously added entry -->
5826N/A <call function="'ldapDeleteWithScript'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : master.getHostname(),
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : master.getRootDn(),
5826N/A 'dsInstancePswd' : master.getRootPwd(),
5826N/A 'dsDn' : ['cn=testuser-0,ou=People,%s' % synchroSuffix]
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Attempt to add entry to servers with deleted objectclass.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Try to add entry to servers; should be rejected with error 65
5826N/A (objectclass violation) -->
5826N/A <iterate var="server" in="_topologyServerList">
5826N/A <call function="'addEntry'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : server.getHostname(),
5826N/A 'dsInstancePort' : server.getPort(),
5826N/A 'dsInstanceDn' : server.getRootDn(),
5826N/A 'dsInstancePswd' : server.getRootPwd(),
5826N/A 'entryToBeAdded' : '%s/replication/testuser-0.ldif' % \
5826N/A clientDataDir,
5826N/A 'expectedRC' : 65
5826N/A }
5826N/A </call>
5826N/A </iterate>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the schema among the servers in
5826N/A the topology -->
5826N/A <call function="'verifySchemas'">
5826N/A [ clientHost, clientPath, master, consumerList, '99-user.ldif' ]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the trees among the servers in
5826N/A the topology -->
5826N/A <call function="'verifyTrees'">
5826N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
5826N/A </call>
5826N/A
5826N/A </sequence>
5826N/A
5826N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5826N/A <message log="1" level="'fatal'">
5826N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5826N/A </message>
5826N/A </catch>
5826N/A <finally>
5826N/A <sequence>
5826N/A <call function="'testCase_Postamble'"/>
5826N/A </sequence>
5826N/A </finally>
5826N/A </try>
5826N/A </sequence>
5826N/A </testcase>
5826N/A </function>
5826N/A
5826N/A
5826N/A
5826N/A <!-- Test Case information
5826N/A #@TestMarker Replication Schema Replication Tests
5826N/A #@TestName Replication: Schema Replication:
5826N/A Modify objectclass
5826N/A #@TestID Modify objectclass
5826N/A #@TestPurpose Check schema replication when an objectclass is
5826N/A modified
5826N/A #@TestPreamble
5826N/A #@TestSteps Remove user-defined objectclass definition on
5826N/A server1
5826N/A #@TestSteps Add modified version of removed user-defined
5826N/A objectclass on server1 (make attributes
5826N/A MANDATORY)
5826N/A #@TestSteps Add entry containing newly added objectclass but
5826N/A without required attributes on every server
5826N/A #@TestPostamble
5826N/A #@TestResult Success if schema modify replicated and entry
5826N/A add rejected with error 65 (objectclass
5826N/A violation) on all servers
5826N/A -->
5826N/A <function name="replication_schema_004" scope="local">
5826N/A <testcase name="getTestCaseName('Modify objectclass')">
5826N/A <sequence>
5826N/A <try>
5826N/A <sequence>
5826N/A
5826N/A <call function="'testCase_Preamble'"/>
5826N/A
5826N/A <message>
5826N/A 'Test Name = %s' % STAXCurrentTestcase
5826N/A </message>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Check schema replication when an objectclass is modified.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A oldObjectclass = '( testobjectclass1-oid NAME \'testobjectclass-1\' SUP person MAY ( street $ testattribute-1 $ c ) X-ORIGIN \'user defined\' )'
5826N/A newObjectclass = '( testobjectclass1-oid NAME \'testobjectclass-1\' SUP person MUST ( street $ testattribute-1 $ c ) X-ORIGIN \'user defined\' )'
5826N/A </script>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Delete oldObjectclass in "master" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify schema in "master" server -->
5826N/A <call function="'modifyAnAttribute'">
5826N/A { 'dsPath' : masterPath,
5826N/A 'dsInstanceHost' : masterHost ,
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : master.getRootDn(),
5826N/A 'dsInstancePswd' : master.getRootPwd(),
5826N/A 'DNToModify' : 'cn=schema',
5826N/A 'attributeName' : 'objectClasses',
5826N/A 'newAttributeValue' : oldObjectclass,
5826N/A 'changetype' : 'delete'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Add newObjectclass in "master" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <call function="'modifyAnAttribute'">
5826N/A { 'dsPath' : masterPath,
5826N/A 'dsInstanceHost' : masterHost ,
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : master.getRootDn(),
5826N/A 'dsInstancePswd' : master.getRootPwd(),
5826N/A 'DNToModify' : 'cn=schema',
5826N/A 'attributeName' : 'objectClasses',
5826N/A 'newAttributeValue' : newObjectclass,
5826N/A 'changetype' : 'add'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Attempt to add entry to servers with deleted objectclass.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Try to add entry to servers; should be rejected with error 65
5826N/A (objectclass violation) -->
5826N/A <iterate var="server" in="_topologyServerList">
5826N/A <call function="'addEntry'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : server.getHostname(),
5826N/A 'dsInstancePort' : server.getPort(),
5826N/A 'dsInstanceDn' : server.getRootDn(),
5826N/A 'dsInstancePswd' : server.getRootPwd(),
5826N/A 'entryToBeAdded' : '%s/replication/testuser-2.ldif' % \
5826N/A clientDataDir,
5826N/A 'expectedRC' : 65
5826N/A }
5826N/A </call>
5826N/A </iterate>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the schema among the servers in
5826N/A the topology -->
5826N/A <call function="'verifySchemas'">
5826N/A [ clientHost, clientPath, master, consumerList, '99-user.ldif' ]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the trees among the servers in
5826N/A the topology -->
5826N/A <call function="'verifyTrees'">
5826N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
5826N/A </call>
5826N/A
5826N/A </sequence>
5826N/A
5826N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5826N/A <message log="1" level="'fatal'">
5826N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5826N/A </message>
5826N/A </catch>
5826N/A <finally>
5826N/A <sequence>
5826N/A <call function="'testCase_Postamble'"/>
5826N/A </sequence>
5826N/A </finally>
5826N/A </try>
5826N/A </sequence>
5826N/A </testcase>
5826N/A </function>
5826N/A
5826N/A
5826N/A
5826N/A <!--- Test Case information
5826N/A #@TestMarker Replication Schema Replication Tests
5826N/A #@TestName Replication: Schema Replication: Add objectclass
5826N/A (edit schema file)
5826N/A #@TestID Add objectclass (edit schema file)
5826N/A #@TestPurpose Check schema replication when a new objectclass
5826N/A is added manually
5826N/A #@TestPreamble
5826N/A #@TestSteps Stop servers
5826N/A #@TestSteps Edit 99-user.ldif to add new objectclass
5826N/A definition on server1
5826N/A #@TestSteps Start servers
5826N/A #@TestSteps Add entry of new objectclass on server2
5826N/A #@TestPostamble
5826N/A #@TestResult Success if schema add and entry add replicated
5826N/A -->
5826N/A <function name="replication_schema_005" scope="local">
5826N/A <testcase name="getTestCaseName('Add objectclass (edit schema file)')">
5826N/A <sequence>
5826N/A <try>
5826N/A <sequence>
5826N/A
5826N/A <call function="'testCase_Preamble'"/>
5826N/A
5826N/A <message>
5826N/A 'Test Name = %s' % STAXCurrentTestcase
5826N/A </message>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Check schema replication when a new objectclass is manually added.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Stop the servers in the topology -->
5826N/A <call function="'stopServers'">
5826N/A [_topologyServerList]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Modify schema in "master" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify schema in "master" server -->
5826N/A <call function="'copyFile'">
5826N/A { 'location' : masterHost,
5826N/A 'remotehost' : masterHost,
5826N/A 'srcfile' : currentSchemaFile,
5826N/A 'destfile' : provSchemaFile
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Edit schema file.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <call function="'LdifModifyWithScript'">
5826N/A { 'location' : masterHost,
5826N/A 'dsPath' : masterPath,
5826N/A 'sourceLdif' : provSchemaFile,
5826N/A 'changesLdif' : '%s/replication/schemamods-0.ldif' % \
5826N/A masterDataDir,
5826N/A 'targetLdif' : currentSchemaFile
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Start the servers in the topology -->
5826N/A <call function="'startServers'">
5826N/A [_topologyServerList]
5826N/A </call>
5826N/A
5826N/A <call function="'Sleep'">
5826N/A { 'sleepForMilliSeconds' : 1000 }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Add entry to "consumer" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Add entry to "consumer" server -->
5826N/A <call function="'addEntry'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : consumerHost,
5826N/A 'dsInstancePort' : consumer.getPort(),
5826N/A 'dsInstanceDn' : consumer.getRootDn(),
5826N/A 'dsInstancePswd' : consumer.getRootPwd(),
5826N/A 'entryToBeAdded' : '%s/replication/newtestuser-0.ldif' % \
5826N/A clientDataDir,
5826N/A 'knownIssue' : 'OPENDJ-452'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the schema among the servers in
5826N/A the topology -->
5826N/A <call function="'verifySchemas'">
5826N/A [ clientHost, clientPath, master, consumerList, '99-user.ldif' ]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the trees among the servers in
5826N/A the topology -->
5826N/A <call function="'verifyTrees'">
5826N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
5826N/A </call>
5826N/A
5826N/A </sequence>
5826N/A
5826N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5826N/A <message log="1" level="'fatal'">
5826N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5826N/A </message>
5826N/A </catch>
5826N/A <finally>
5826N/A <sequence>
5826N/A <call function="'testCase_Postamble'"/>
5826N/A </sequence>
5826N/A </finally>
5826N/A </try>
5826N/A </sequence>
5826N/A </testcase>
5826N/A </function>
5826N/A
5826N/A
5826N/A
5826N/A
5826N/A <!--- Test Case information
5826N/A #@TestMarker Replication Schema Replication Tests
5826N/A #@TestName Replication: Schema Replication: Add
5826N/A attributetype (edit schema file)
5826N/A #@TestID Add attributetype (edit schema file)
5826N/A #@TestPurpose Check schema replication when a new
5826N/A attributetype is added manually
5826N/A #@TestPreamble
5826N/A #@TestSteps Stop servers
5826N/A #@TestSteps Edit 99-user.ldif to add new objectclass and
5826N/A new attributeType definition on server1
5826N/A #@TestSteps Start servers
5826N/A #@TestSteps Add new entry containing new objectclass and
5826N/A new attributeType on server2
5826N/A #@TestPostamble
5826N/A #@TestResult Success if schema add and entry adds replicated
5826N/A -->
5826N/A <function name="replication_schema_006" scope="local">
5826N/A <testcase name="getTestCaseName('Add attributetype (edit schema file)')">
5826N/A <sequence>
5826N/A <try>
5826N/A <sequence>
5826N/A
5826N/A <call function="'testCase_Preamble'"/>
5826N/A
5826N/A <message>
5826N/A 'Test Name = %s' % STAXCurrentTestcase
5826N/A </message>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Check schema replication when a new attributetype is manually added.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Stop the servers in the topology -->
5826N/A <call function="'stopServers'">
5826N/A [_topologyServerList]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Modify schema in "master" server .' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify schema in "master" server -->
5826N/A <call function="'copyFile'">
5826N/A { 'location' : masterHost,
5826N/A 'remotehost' : masterHost,
5826N/A 'srcfile' : currentSchemaFile,
5826N/A 'destfile' : provSchemaFile
5826N/A }
5826N/A </call>
5826N/A <call function="'LdifModifyWithScript'">
5826N/A { 'location' : masterHost,
5826N/A 'dsPath' : masterPath,
5826N/A 'sourceLdif' : provSchemaFile,
5826N/A 'changesLdif' : '%s/replication/schemamods-1.ldif' % \
5826N/A masterDataDir,
5826N/A 'targetLdif' : currentSchemaFile
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Start the servers in the topology.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Start the servers in the topology -->
5826N/A <call function="'startServers'">
5826N/A [_topologyServerList]
5826N/A </call>
5826N/A
5826N/A <call function="'Sleep'">
5826N/A { 'sleepForMilliSeconds' : 1000 }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Add entry to "consumer" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Add entry to "consumer" server -->
5826N/A <call function="'addEntry'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : consumerHost,
5826N/A 'dsInstancePort' : consumer.getPort(),
5826N/A 'dsInstanceDn' : consumer.getRootDn(),
5826N/A 'dsInstancePswd' : consumer.getRootPwd(),
5826N/A 'entryToBeAdded' : '%s/replication/newtestuser-1.ldif' % \
5826N/A clientDataDir,
5826N/A 'knownIssue' : 'OPENDJ-452'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the schema among the servers in
5826N/A the topology -->
5826N/A <call function="'verifySchemas'">
5826N/A [ clientHost, clientPath, master, consumerList, '99-user.ldif' ]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the trees among the servers in
5826N/A the topology -->
5826N/A <call function="'verifyTrees'">
5826N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
5826N/A </call>
5826N/A
5826N/A </sequence>
5826N/A
5826N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5826N/A <message log="1" level="'fatal'">
5826N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5826N/A </message>
5826N/A </catch>
5826N/A <finally>
5826N/A <sequence>
5826N/A <call function="'testCase_Postamble'"/>
5826N/A </sequence>
5826N/A </finally>
5826N/A </try>
5826N/A </sequence>
5826N/A </testcase>
5826N/A </function>
5826N/A
5826N/A
5826N/A
5826N/A
5826N/A <!-- Test Case information
5826N/A #@TestMarker Replication Schema Replication Tests
5826N/A #@TestName Replication: Schema Replication: Delete
5826N/A objectclass (edit schema file)
5826N/A #@TestID Delete objectclass (edit schema file)
5826N/A #@TestPurpose Check schema replication when an objectclass is
5826N/A deleted manually
5826N/A #@TestPreamble
5826N/A #@TestSteps Stop servers
5826N/A #@TestSteps Edit 99-user.ldif to remove user-defined
5826N/A objectclass definition on server1
5826N/A #@TestSteps Start servers
5826N/A #@TestSteps Delete entry on server1
5826N/A #@TestSteps Add entry containing removed objectclass on
5826N/A every server
5826N/A #@TestPostamble
5826N/A #@TestResult Success if schema remove replicated and last
5826N/A entry add rejected on all servers (error 65:
5826N/A objectclass violation)
5826N/A -->
5826N/A <function name="replication_schema_007" scope="local">
5826N/A <testcase name="getTestCaseName('Delete objectclass (edit schema file)')">
5826N/A <sequence>
5826N/A <try>
5826N/A <sequence>
5826N/A
5826N/A <call function="'testCase_Preamble'"/>
5826N/A
5826N/A <message>
5826N/A 'Test Name = %s' % STAXCurrentTestcase
5826N/A </message>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Check schema replication when a new objectclass is manually deleted.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Stop the servers in the topology -->
5826N/A <call function="'stopServers'">
5826N/A [_topologyServerList]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Modify schema in "master" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify schema in "master" server -->
5826N/A <call function="'copyFile'">
5826N/A { 'location' : masterHost,
5826N/A 'remotehost' : masterHost,
5826N/A 'srcfile' : currentSchemaFile,
5826N/A 'destfile' : provSchemaFile
5826N/A }
5826N/A </call>
5826N/A <call function="'LdifModifyWithScript'">
5826N/A { 'location' : masterHost,
5826N/A 'dsPath' : masterPath,
5826N/A 'sourceLdif' : provSchemaFile,
5826N/A 'changesLdif' : '%s/replication/schemamods-2.ldif' % \
5826N/A masterDataDir,
5826N/A 'targetLdif' : currentSchemaFile
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Start the servers in the topology.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Start the servers in the topology -->
5826N/A <call function="'startServers'">
5826N/A [_topologyServerList]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Delete previously added entry.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Delete previously added entry -->
5826N/A <call function="'ldapDeleteWithScript'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : master.getHostname(),
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : master.getRootDn(),
5826N/A 'dsInstancePswd' : master.getRootPwd(),
5826N/A 'dsDn' : ['cn=newtestuser-0,ou=People,%s' % synchroSuffix],
5826N/A 'knownIssue' : 'OPENDJ-452'
5826N/A
5826N/A
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'Sleep'">
5826N/A { 'sleepForMilliSeconds' : 1000 }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Try to add entry to servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Try to add entry to servers; should be rejected with error 65
5826N/A (objectclass violation) -->
5826N/A <!-- If the add doesn't return 65, it may mean we came across
5826N/A issue OPENDJ-453 (Manual schema objectclass delete not replicated) -->
5826N/A <iterate var="server" in="_topologyServerList">
5826N/A <call function="'addEntry'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : server.getHostname(),
5826N/A 'dsInstancePort' : server.getPort(),
5826N/A 'dsInstanceDn' : server.getRootDn(),
5826N/A 'dsInstancePswd' : server.getRootPwd(),
5826N/A 'entryToBeAdded' : '%s/replication/newtestuser-0.ldif' % \
5826N/A clientDataDir,
5826N/A 'expectedRC' : 65,
5826N/A 'knownIssue' : 'OPENDJ-453'
5826N/A }
5826N/A </call>
5826N/A </iterate>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the schema among the servers in
5826N/A the topology -->
5826N/A <call function="'verifySchemas'">
5826N/A [ clientHost, clientPath, master, consumerList, '99-user.ldif' ]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the trees among the servers in
5826N/A the topology -->
5826N/A <call function="'verifyTrees'">
5826N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
5826N/A </call>
5826N/A
5826N/A </sequence>
5826N/A
5826N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5826N/A <message log="1" level="'fatal'">
5826N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5826N/A </message>
5826N/A </catch>
5826N/A <finally>
5826N/A <sequence>
5826N/A <call function="'testCase_Postamble'"/>
5826N/A </sequence>
5826N/A </finally>
5826N/A </try>
5826N/A </sequence>
5826N/A </testcase>
5826N/A </function>
5826N/A
5826N/A
5826N/A
5826N/A <!-- Test Case information
5826N/A #@TestMarker Replication Schema Replication Tests
5826N/A #@TestName Replication: Schema Replication: Modify
5826N/A objectclass (edit schema file)
5826N/A #@TestID Modify objectclass (edit schema file)
5826N/A #@TestPurpose Check schema replication when an objectclass is
5826N/A modified manually
5826N/A #@TestPreamble
5826N/A #@TestSteps Stop servers
5826N/A #@TestSteps Edit 99-user.ldif to modify user-defined
5826N/A objectclass (make attributes MANDATORY) on
5826N/A server1
5826N/A #@TestSteps Start servers
5826N/A #@TestSteps Add entry containing newly added objectclass but
5826N/A without required attributes on every server
5826N/A #@TestPostamble
5826N/A #@TestResult Success if schema modify replicated and entry
5826N/A add rejected with error 65 (objectclass
5826N/A violation) on all servers
5826N/A -->
5826N/A <function name="replication_schema_008" scope="local">
5826N/A <testcase name="getTestCaseName('Modify objectclass (edit schema file)')">
5826N/A <sequence>
5826N/A <try>
5826N/A <sequence>
5826N/A
5826N/A <call function="'testCase_Preamble'"/>
5826N/A
5826N/A <message>
5826N/A 'Test Name = %s' % STAXCurrentTestcase
5826N/A </message>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Check schema replication when a new objectclass is manually modified.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Stop the servers in the topology -->
5826N/A <call function="'stopServers'">
5826N/A [_topologyServerList]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Modify schema in "master" server.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify schema in "master" server -->
5826N/A <call function="'copyFile'">
5826N/A { 'location' : masterHost,
5826N/A 'remotehost' : masterHost,
5826N/A 'srcfile' : currentSchemaFile,
5826N/A 'destfile' : provSchemaFile
5826N/A }
5826N/A </call>
5826N/A <call function="'LdifModifyWithScript'">
5826N/A { 'location' : masterHost,
5826N/A 'dsPath' : masterPath,
5826N/A 'sourceLdif' : provSchemaFile,
5826N/A 'changesLdif' : '%s/replication/schemamods-3.ldif' % \
5826N/A masterDataDir,
5826N/A 'targetLdif' : currentSchemaFile
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Start the servers in the topology.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Start the servers in the topology -->
5826N/A <call function="'startServers'">
5826N/A [_topologyServerList]
5826N/A </call>
5826N/A
5826N/A <call function="'Sleep'">
5826N/A { 'sleepForMilliSeconds' : 1000 }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Try to add entry to servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Try to add entry to servers; should be rejected with error 65
5826N/A (objectclass violation) -->
5826N/A <!-- If the add doesn't return 65, it may mean we came across
5826N/A issue OPENDJ-453 (Manual schema objectclass delete not replicated) -->
5826N/A <iterate var="server" in="_topologyServerList">
5826N/A <call function="'addEntry'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : server.getHostname(),
5826N/A 'dsInstancePort' : server.getPort(),
5826N/A 'dsInstanceDn' : server.getRootDn(),
5826N/A 'dsInstancePswd' : server.getRootPwd(),
5826N/A 'entryToBeAdded' : '%s/replication/newtestuser-2.ldif' % \
5826N/A clientDataDir,
5826N/A 'expectedRC' : 65,
5826N/A 'knownIssue' : ['OPENDJ-453','OPENDJ-452']
5826N/A }
5826N/A </call>
5826N/A </iterate>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the schema among the servers in
5826N/A the topology -->
5826N/A <!-- Since this testcase inherits the 99-user.ldif from the one
5826N/A before, as long as OPENDJ-453 is still present, the schema files will
5826N/A differ as the second server will still have newobjectclass-0 -->
5826N/A <call function="'verifySchemas'">
5826N/A [ clientHost, clientPath, master, consumerList, '99-user.ldif',
5826N/A 'OPENDJ-453' ]
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Verify the synchronization of the trees among the servers in
5826N/A the topology -->
5826N/A <call function="'verifyTrees'">
5826N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
5826N/A </call>
5826N/A
5826N/A </sequence>
5826N/A
5826N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5826N/A <message log="1" level="'fatal'">
5826N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5826N/A </message>
5826N/A </catch>
5826N/A <finally>
5826N/A <sequence>
5826N/A <call function="'testCase_Postamble'"/>
5826N/A </sequence>
5826N/A </finally>
5826N/A </try>
5826N/A </sequence>
5826N/A </testcase>
5826N/A </function>
5826N/A
5826N/A</stax>