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