| | |
| | | ! CDDL HEADER END |
| | | ! |
| | | ! Copyright 2007-2008 Sun Microsystems, Inc. |
| | | ! Portions Copyright 2011 ForgeRock AS. |
| | | ! Portions Copyright 2011-2012 ForgeRock AS. |
| | | ! --> |
| | | <stax> |
| | | |
| | |
| | | |
| | | consumer = consumerList[0] |
| | | consumerHost = consumer.getHostname() |
| | | |
| | | msg1 = 'Replication: Schema:' |
| | | </script> |
| | | |
| | | |
| | |
| | | <testcase name="getTestCaseName('Add objectclass')"> |
| | | <sequence> |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'Replication: Schema Replication: Add objectclass. \ |
| | | Check schema replication when a new objectclass is added' |
| | | 'Test Name = %s' % STAXCurrentTestcase |
| | | </message> |
| | | |
| | | <message> |
| | | '%s Add objectclass. Check schema replication when a new objectclass is added' % msg1 |
| | | </message> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Load entries into "master" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Load entries into "master" server --> |
| | | <call function="'addEntry'"> |
| | | { 'location' : clientHost, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Add new object class.' % msg1 } |
| | | </call> |
| | | |
| | | <script> |
| | | newObjectclass = '( testobjectclass-oid NAME \'testobjectclass-0\' SUP person MAY ( street $ c ) X-ORIGIN \'user defined\' )' |
| | | </script> |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Add entry to "consumer" server using new objectclass.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Add entry to "consumer" server --> |
| | | <call function="'addEntry'"> |
| | | { 'location' : clientHost, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the schema among the servers |
| | | in the topology --> |
| | | <call function="'verifySchemas'"> |
| | | [ clientHost, clientPath, master, consumerList, '99-user.ldif' ] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | |
| | | <testcase name="getTestCaseName('Add attributetype')"> |
| | | <sequence> |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'Replication: Schema Replication: Add attributetype Check \ |
| | | schema replication when a new attributetype is added' |
| | | '%s Add Attributetype. schema replication when a new Attributetype is added' % msg1 |
| | | </message> |
| | | |
| | | <script> |
| | |
| | | newAttributetype = '( testattribute1-oid NAME \'testattribute-1\' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN \'user defined\' )' |
| | | </script> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Add newAttributetype in "master" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Modify schema in "master" server --> |
| | | <call function="'modifyAnAttribute'"> |
| | | { 'dsPath' : masterPath, |
| | |
| | | 'changetype' : 'add' |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Add newObjectclass in "master" server.' % msg1 } |
| | | </call> |
| | | |
| | | <call function="'modifyAnAttribute'"> |
| | | { 'dsPath' : masterPath, |
| | | 'dsInstanceHost' : masterHost , |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Add entry to "consumer" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Add entry to "consumer" server --> |
| | | <call function="'addEntry'"> |
| | | { 'location' : clientHost, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the schema among the servers in |
| | | the topology --> |
| | | <call function="'verifySchemas'"> |
| | | [ clientHost, clientPath, master, consumerList, '99-user.ldif' ] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | |
| | | <testcase name="getTestCaseName('Delete objectclass')"> |
| | | <sequence> |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'Replication: Schema Replication: Delete objectclass Check \ |
| | | schema replication when an objectclass is deleted' |
| | | 'Test Name = %s' % STAXCurrentTestcase |
| | | </message> |
| | | |
| | | <message> |
| | | '%s Delete objectclass. Check schema replication when an objectclass is deleted' % msg1 |
| | | </message> |
| | | |
| | | <script> |
| | | newObjectclass = '( testobjectclass-oid NAME \'testobjectclass-0\' SUP person MAY ( street $ c ) X-ORIGIN \'user defined\' )' |
| | | </script> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Delete newObjectclass in "master" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Modify schema in "master" server --> |
| | | <call function="'modifyAnAttribute'"> |
| | | { 'dsPath' : masterPath, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Delete previously added entry.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Delete previously added entry --> |
| | | <call function="'ldapDeleteWithScript'"> |
| | | { 'location' : clientHost, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Attempt to add entry to servers with deleted objectclass.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Try to add entry to servers; should be rejected with error 65 |
| | | (objectclass violation) --> |
| | | <iterate var="server" in="_topologyServerList"> |
| | |
| | | </call> |
| | | </iterate> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the schema among the servers in |
| | | the topology --> |
| | | <call function="'verifySchemas'"> |
| | | [ clientHost, clientPath, master, consumerList, '99-user.ldif' ] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | |
| | | <testcase name="getTestCaseName('Modify objectclass')"> |
| | | <sequence> |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'Replication: Schema Replication: Modify objectclass Check \ |
| | | schema replication when an objectclass is modified' |
| | | 'Test Name = %s' % STAXCurrentTestcase |
| | | </message> |
| | | |
| | | <message> |
| | | '%s Modify objectclass. Check schema replication when an objectclass is modified' % msg1 |
| | | </message> |
| | | |
| | | <script> |
| | |
| | | newObjectclass = '( testobjectclass1-oid NAME \'testobjectclass-1\' SUP person MUST ( street $ testattribute-1 $ c ) X-ORIGIN \'user defined\' )' |
| | | </script> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Delete oldObjectclass in "master" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Modify schema in "master" server --> |
| | | <call function="'modifyAnAttribute'"> |
| | | { 'dsPath' : masterPath, |
| | |
| | | 'changetype' : 'delete' |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Add newObjectclass in "master" server.' % msg1 } |
| | | </call> |
| | | |
| | | <call function="'modifyAnAttribute'"> |
| | | { 'dsPath' : masterPath, |
| | | 'dsInstanceHost' : masterHost , |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Attempt to add entry to servers with deleted objectclass.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Try to add entry to servers; should be rejected with error 65 |
| | | (objectclass violation) --> |
| | | <iterate var="server" in="_topologyServerList"> |
| | |
| | | </call> |
| | | </iterate> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the schema among the servers in |
| | | the topology --> |
| | | <call function="'verifySchemas'"> |
| | | [ clientHost, clientPath, master, consumerList, '99-user.ldif' ] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | |
| | | ('Add objectclass (edit schema file)')"> |
| | | <sequence> |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'Replication: Schema Replication: Add objectclass (edit \ |
| | | schema file). Check schema replication when a new objectclass \ |
| | | is added manually' |
| | | 'Test Name = %s' % STAXCurrentTestcase |
| | | </message> |
| | | |
| | | <message> |
| | | '%s Add objectclass. (edit schema file). \ |
| | | Check schema replication when a new objectclass \ |
| | | is added manually ' % msg1 |
| | | </message> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Stop the servers in the topology --> |
| | | <call function="'stopServers'"> |
| | | [_topologyServerList] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Modify schema in "master" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Modify schema in "master" server --> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | |
| | | 'destfile' : provSchemaFile |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Edit schema file.' % msg1 } |
| | | </call> |
| | | |
| | | <call function="'LdifModifyWithScript'"> |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Start the servers in the topology --> |
| | | <call function="'startServers'"> |
| | | [_topologyServerList] |
| | |
| | | { 'sleepForMilliSeconds' : 1000 } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Add entry to "consumer" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Add entry to "consumer" server --> |
| | | <call function="'addEntry'"> |
| | | { 'location' : clientHost, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the schema among the servers in |
| | | the topology --> |
| | | <call function="'verifySchemas'"> |
| | | [ clientHost, clientPath, master, consumerList, '99-user.ldif' ] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | |
| | | attributetype is added manually' |
| | | </message> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Stop the servers in the topology --> |
| | | <call function="'stopServers'"> |
| | | [_topologyServerList] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Modify schema in "master" server .' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Modify schema in "master" server --> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Start the servers in the topology.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Start the servers in the topology --> |
| | | <call function="'startServers'"> |
| | | [_topologyServerList] |
| | |
| | | { 'sleepForMilliSeconds' : 1000 } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Add entry to "consumer" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Add entry to "consumer" server --> |
| | | <call function="'addEntry'"> |
| | | { 'location' : clientHost, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the schema among the servers in |
| | | the topology --> |
| | | <call function="'verifySchemas'"> |
| | | [ clientHost, clientPath, master, consumerList, '99-user.ldif' ] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | |
| | | deleted manually' |
| | | </message> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Stop the servers in the topology --> |
| | | <call function="'stopServers'"> |
| | | [_topologyServerList] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Modify schema in "master" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Modify schema in "master" server --> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Start the servers in the topology.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Start the servers in the topology --> |
| | | <call function="'startServers'"> |
| | | [_topologyServerList] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Delete previously added entry.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Delete previously added entry --> |
| | | <call function="'ldapDeleteWithScript'"> |
| | |
| | | { 'sleepForMilliSeconds' : 1000 } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Try to add entry to servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- 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 |
| | |
| | | </call> |
| | | </iterate> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the schema among the servers in |
| | | the topology --> |
| | | <call function="'verifySchemas'"> |
| | | [ clientHost, clientPath, master, consumerList, '99-user.ldif' ] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | |
| | | modified manually' |
| | | </message> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Stop the servers in the topology.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Stop the servers in the topology --> |
| | | <call function="'stopServers'"> |
| | | [_topologyServerList] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Modify schema in "master" server.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Modify schema in "master" server --> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Start the servers in the topology.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Start the servers in the topology --> |
| | | <call function="'startServers'"> |
| | | [_topologyServerList] |
| | |
| | | { 'sleepForMilliSeconds' : 1000 } |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Try to add entry to servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- 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 |
| | |
| | | </call> |
| | | </iterate> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the schema on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the schema among the servers in |
| | | the topology --> |
| | | <!-- Since this testcase inherits the 99-user.ldif from the one |
| | |
| | | '2355' ] |
| | | </call> |
| | | |
| | | <call function="'testStep'"> |
| | | { 'stepMessage' : '%s Verify the synchronization of the trees on all the servers.' % msg1 } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |