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 !
5826N/A ! You can obtain a copy of the license at
5826N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
5826N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
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
5826N/A ! file and include the License file at
5826N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
5826N/A ! add the following below this CDDL HEADER, with the fields enclosed
5826N/A ! by brackets "[]" replaced with your own identifying information:
5826N/A ! Portions Copyright [yyyy] [name of copyright owner]
5826N/A !
5826N/A ! CDDL HEADER END
5826N/A !
5826N/A ! Copyright 2007-2010 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 Basic Tests
5826N/A #@TestName Replication: Basic: Add Entry
5826N/A #@TestID Add Entry
5826N/A #@TestPurpose Check that an entry add is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Add root suffix entry
5826N/A #@TestPostamble
5826N/A #@TestResult Success if trees synchronised over the topology
5826N/A -->
5826N/A <function name="replication_basic_001" scope="local">
5826N/A <testcase name="getTestCaseName('Add Entry')">
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 that an add of an entry is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "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_add_root_suffix.ldif' \
5826N/A % client.getTmpDir()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry
5826N/A #@TestID Modify Entry
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Add entry on server
5826N/A #@TestSteps Modify entry
5826N/A #@TestSteps Check modify worked on server
5826N/A #@TestPostamble
5826N/A #@TestResult Success if modify worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_002" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry')">
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 that a modify of an entry is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A
5826N/A <!-- Modify "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_add_single.ldif' \
5826N/A % client.getTmpDir()
5826N/A }
5826N/A </call>
5826N/A <call function="'ldapModifyWithScript'">
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 'dsFilename' : '%s/replication_mod.ldif' \
5826N/A % client.getTmpDir()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : entryDn,
5826N/A 'dsFilter' : '%s=%s' % (attr_type,attr_value)
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength ,
5826N/A 'result' : searchResult ,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Delete Entry
5826N/A #@TestID Delete Entry
5826N/A #@TestPurpose Check that an entry delete is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Delete entry
5826N/A #@TestSteps Check delete worked on server
5826N/A #@TestPostamble
5826N/A #@TestResult Success if delete worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_003" scope="local">
5826N/A <testcase name="getTestCaseName('Delete Entry')">
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 that a delete of an entry is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "master" server -->
5826N/A <call function="'DeleteEntry'">
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 'dsBaseDN' : entryDn
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : entryDn,
5826N/A 'dsFilter' : 'objectclass=*',
5826N/A 'expectedRC' : 32
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Add Multiple Entries
5826N/A #@TestID Add Multiple Entries
5826N/A #@TestPurpose Check that a multiple-entry add is well
5826N/A propagated by replication.
5826N/A #@TestPreamble Delete root suffix entry
5826N/A #@TestSteps Add multiple entries
5826N/A #@TestPostamble
5826N/A #@TestResult Success if trees synchronised over the topology
5826N/A -->
5826N/A <function name="replication_basic_004" scope="local">
5826N/A <testcase name="getTestCaseName('Add Multiple Entries')">
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 that multiple adds of an entry are replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Delete the root entry, as it is already present in
5826N/A Example.ldif file -->
5826N/A <call function="'DeleteEntry'">
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 'dsBaseDN' : synchroSuffix
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "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 % master.getDataDir()
5826N/A }
5826N/A </call>
5826N/A
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - add single
5826N/A attribute
5826N/A #@TestID Modify Entry - add single attribute
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Add description attribute to entry
5826N/A #@TestSteps Check modify worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if modify worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_005" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - add single attribute')">
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 that a modify (add single attribute) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "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' : 'uid=tmorris, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'attributeName' : 'description',
5826N/A 'newAttributeValue' : ' ',
5826N/A 'changetype' : 'add'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=tmorris, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'description=*'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength ,
5826N/A 'result' : searchResult ,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - add single
5826N/A value
5826N/A #@TestID Modify Entry - add single value
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Add single-valued attribute to entry
5826N/A #@TestSteps Check modify worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if modify worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_006" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - add single value')">
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 that a modify (add single value) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "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' : 'uid=tmorris, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'attributeName' : 'departmentnumber',
5826N/A 'newAttributeValue' : '5203214400',
5826N/A 'changetype' : 'add'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=tmorris, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'departmentnumber=5203214400'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - delete single
5826N/A attribute
5826N/A #@TestID Modify Entry - delete single attribute
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Delete attribute in entry
5826N/A #@TestSteps Check delete worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if delete worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_007" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - delete single attribute')">
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 that a modify (delete single attribute) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filename = 'replication_mod_delete.ldif'
5826N/A filePath = '%s/%s' % (local.temp,filename)
5826N/A dn = 'uid=smason, ou=People,%s' % synchroSuffix
5826N/A modif = 'delete'
5826N/A attrType = 'roomNumber'
5826N/A attrValue = None
5826N/A write_replication_mod_ldif_file(filePath, dn, modif, attrType,
5826N/A attrValue)
5826N/A </script>
5826N/A
5826N/A <!-- Copy the replication_mod ldif to client host -->
5826N/A <message>
5826N/A 'Copy %s file from %s to %s' \
5826N/A % (filename,local.temp,client.getTmpDir())
5826N/A </message>
5826N/A <call function="'copyFile'">
5826N/A { 'srcfile' : filePath,
5826N/A 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
5826N/A 'remotehost' : client.getHostname()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "master" server -->
5826N/A <call function="'ldapModifyWithScript'">
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 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=smason, ou=People,%s' % synchroSuffix,
5826N/A 'dsFilter' : 'roomNumber=*'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 0
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - delete single
5826N/A value
5826N/A #@TestID Modify Entry - delete single value
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Delete single attribute value in entry
5826N/A #@TestSteps Check delete worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if delete worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_008" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - delete single value')">
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 that a modify (delete single value) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "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' : 'uid=jwalker, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'attributeName' : 'roomNumber',
5826N/A 'newAttributeValue' : '3915',
5826N/A 'changetype' : 'delete'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=jwalker, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'roomNumber=3915'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 0
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - add multiple
5826N/A values
5826N/A #@TestID Modify Entry - add multiple values
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Add multiple-valued attribute to entry
5826N/A #@TestSteps Check add worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if add worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_009" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - add multiple values')">
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 that a modify (add multiple values) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A valuesToAdd = []
5826N/A valuesToAdd.append('postaladdress:Residence Parc Europe')
5826N/A valuesToAdd.append('postaladdress:Appartement #6')
5826N/A valuesToAdd.append('postaladdress:31 Rue General Mangin')
5826N/A valuesToAdd.append('postaladdress:38100 Grenoble')
5826N/A </script>
5826N/A
5826N/A <!-- Modify "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' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'listAttributes' : valuesToAdd,
5826N/A 'changetype' : 'add'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filter1 = '(postaladdress=Residence Parc Europe)'
5826N/A filter2 = '(postaladdress=Appartement #6)'
5826N/A filter3 = '(postaladdress=31 Rue General Mangin)'
5826N/A filter4 = '(postaladdress=38100 Grenoble)'
5826N/A </script>
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : '&amp;%s%s%s%s' \
5826N/A % (filter1, filter2, filter3, filter4)
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - delete
5826N/A multiple values
5826N/A #@TestID Modify Entry - delete multiple values
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Delete multiple values in same attribute
5826N/A #@TestSteps Check delete worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if delete worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_010" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - delete multiple values')">
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 that a modify (delete multiple values) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A valuesToDelete = []
5826N/A valuesToDelete.append('postaladdress:Appartement #6')
5826N/A valuesToDelete.append('postaladdress:38100 Grenoble')
5826N/A </script>
5826N/A
5826N/A <!-- Modify "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' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'listAttributes' : valuesToDelete,
5826N/A 'changetype' : 'delete'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filter1 = '(postaladdress=Appartement #6)'
5826N/A filter2 = '(postaladdress=38100 Grenoble)'
5826N/A </script>
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : '|%s%s' % (filter1, filter2)
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 0
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - replace
5826N/A multiple values
5826N/A #@TestID Modify Entry - replace multiple values
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Replace multiple values in same attribute
5826N/A #@TestSteps Check replace worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if replace worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_011" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - replace multiple values')">
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 that a modify (replace multiple values) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A valuesToReplace = []
5826N/A valuesToReplace.append('postaladdress: Residence Letilleuil')
5826N/A valuesToReplace.append('postaladdress: 18 rue Nicolas Chorier')
5826N/A </script>
5826N/A
5826N/A <!-- Modify "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' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'listAttributes' : valuesToReplace,
5826N/A 'changetype' : 'replace'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filter1 = '(postaladdress=Residence Letilleuil)'
5826N/A filter2 = '(postaladdress=18 rue Nicolas Chorier)'
5826N/A </script>
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : '&amp;%s%s' % (filter1, filter2)
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength ,
5826N/A 'result' : searchResult ,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - add single
5826N/A value to multiple valued attribute
5826N/A #@TestID Modify Entry - add single value to multiple
5826N/A valued attribute
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Add single value to multiple-valued attribute
5826N/A #@TestSteps Check value add worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if value add worked and trees
5826N/A synchronised over the topology
5826N/A -->
5826N/A <function name="replication_basic_012" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - add single value to multiple valued attribute')">
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 that a modify (add single value to multiple valued attribute) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A valuesToAdd = []
5826N/A valuesToAdd.append('postaladdress:38000 Grenoble')
5826N/A </script>
5826N/A
5826N/A <!-- Modify "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' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'listAttributes' : valuesToAdd,
5826N/A 'changetype' : 'add'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'postaladdress=38000 Grenoble'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - delete single
5826N/A value from multiple valued attribute
5826N/A #@TestID Modify Entry - delete single value from multiple
5826N/A valued attribute
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Delete single value from multiple-valued
5826N/A attribute
5826N/A #@TestSteps Check value delete worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if value delete worked and trees
5826N/A synchronised over the topology
5826N/A -->
5826N/A <function name="replication_basic_013" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - delete single value from multiple valued attribute')">
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 that a modify (delete single value from multiple valued attribute) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A valuesToDelete = []
5826N/A valuesToDelete.append('postaladdress: Residence Letilleuil')
5826N/A </script>
5826N/A
5826N/A <!-- Modify "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' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'listAttributes' : valuesToDelete,
5826N/A 'changetype' : 'delete'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'postaladdress=Residence Letilleuil'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 0
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - replace case
5826N/A sensitive attribute
5826N/A #@TestID Modify Entry - replace case sensitive attribute
5826N/A #@TestPurpose Check that case sensitive attribute
5826N/A modifications are replicated.
5826N/A #@TestPreamble
5826N/A #@TestSteps Add entry
5826N/A #@TestSteps Replace description attribute in entry
5826N/A #@TestSteps Check replace worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if replace worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_014" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - replace case sensitive attribute')">
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 that a modify (replace case sensitive attribute) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "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/tfitter.ldif' \
5826N/A % master.getDataDir()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A value = 'Profession Tap Fitter and Plumber'
5826N/A valuesToReplace = []
5826N/A valuesToReplace.append('description: %s' % value)
5826N/A </script>
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' : 'uid=tfitter, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'listAttributes' : valuesToReplace,
5826N/A 'changetype' : 'replace'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filter = 'description=%s' % value
5826N/A </script>
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=tfitter, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : filter
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - replace
5826N/A userpassword
5826N/A #@TestID Modify Entry - replace userpassword
5826N/A #@TestPurpose Check replaced userpasswords are replicated.
5826N/A #@TestPreamble
5826N/A #@TestSteps Add user entry on server A
5826N/A #@TestSteps Bind as user with userpassword to server A
5826N/A #@TestSteps Replace user's userpassword
5826N/A #@TestSteps Bind as user with old userpassword to server B
5826N/A #@TestSteps Bind as user with new userpassword to server B
5826N/A #@TestPostamble
5826N/A #@TestResult Success if bind with old userpassword fails with
5826N/A LDAP_INVALID_CREDENTIALS error and bind with new
5826N/A user password suceeds and trees are synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_015" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - replace userpassword')">
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 that a modify (replace userpassword) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Add entry to "master" server -->
5826N/A <script>
5826N/A userDn = 'uid=pmoriarty, ou=People, %s' % synchroSuffix
5826N/A oldPassword = 'jajejijoju'
5826N/A newPassword = 'JUAJUAJUA'
5826N/A
5826N/A listAttr = []
5826N/A listAttr.append('objectclass:top')
5826N/A listAttr.append('objectclass:organizationalperson')
5826N/A listAttr.append('objectclass:inetorgperson')
5826N/A listAttr.append('objectclass:person')
5826N/A listAttr.append('givenname:Professor')
5826N/A listAttr.append('sn:Moriarty')
5826N/A listAttr.append('cn:Professor Moriarty')
5826N/A listAttr.append('l:London')
5826N/A listAttr.append('userpassword:%s' % oldPassword)
5826N/A </script>
5826N/A <message>
5826N/A 'replace userpassword: add user entry %s' % userDn
5826N/A </message>
5826N/A <call function="'addAnEntry'">
5826N/A { 'location' : masterHost,
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 'DNToAdd' : userDn,
5826N/A 'listAttributes' : listAttr
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check userDn can bind with oldPassword on "master" server -->
5826N/A <message>
5826N/A 'replace userpassword: bind on master using password %s' \
5826N/A % oldPassword
5826N/A </message>
5826N/A <call function="'ldapSearchWithScript'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : masterHost,
5826N/A 'dsInstancePort' : master.getPort(),
5826N/A 'dsInstanceDn' : userDn,
5826N/A 'dsInstancePswd' : oldPassword,
5826N/A 'dsBaseDN' : synchroSuffix,
5826N/A 'dsFilter' : 'objectclass=*'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Replace userDn's oldPassword with newPassword on "master"
5826N/A server -->
5826N/A <message>
5826N/A 'replace userpassword: replace user password %s with %s' \
5826N/A % (oldPassword, newPassword)
5826N/A </message>
5826N/A <call function="'modifyAnAttribute'">
5826N/A { 'location' : masterHost,
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' : userDn,
5826N/A 'attributeName' : 'userpassword',
5826N/A 'newAttributeValue' : 'JUAJUAJUA',
5826N/A 'changetype' : 'replace'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A consumer = consumerList[0]
5826N/A </script>
5826N/A <!-- Try binding as userDn with oldPassword on "consumer" server:
5826N/A ==> should fail with LDAP_INVALID_CREDENTIALS (49) error -->
5826N/A <message>
5826N/A 'replace userpassword: bind on consumer using old password %s :\
5826N/A should fail with error LDAP_INVALID_CREDENTIALS (49)' \
5826N/A % oldPassword
5826N/A </message>
5826N/A <call function="'ldapSearchWithScript'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : consumer.getHostname(),
5826N/A 'dsInstancePort' : consumer.getPort(),
5826N/A 'dsInstanceDn' : userDn,
5826N/A 'dsInstancePswd' : oldPassword,
5826N/A 'dsBaseDN' : synchroSuffix,
5826N/A 'dsFilter' : 'objectclass=*',
5826N/A 'expectedRC' : 49
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check userDn can bind with newPassword on "consumer"
5826N/A server -->
5826N/A <message>
5826N/A 'replace userpassword: bind on consumer using new password %s :\
5826N/A should pass' % newPassword
5826N/A </message>
5826N/A <call function="'ldapSearchWithScript'">
5826N/A { 'location' : clientHost,
5826N/A 'dsPath' : clientPath,
5826N/A 'dsInstanceHost' : consumer.getHostname(),
5826N/A 'dsInstancePort' : consumer.getPort(),
5826N/A 'dsInstanceDn' : userDn,
5826N/A 'dsInstancePswd' : newPassword,
5826N/A 'dsBaseDN' : synchroSuffix,
5826N/A 'dsFilter' : 'objectclass=*'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Delete added entry as clean-up measure -->
5826N/A <message>
5826N/A 'replace userpassword: delete user entry %s on master' \
5826N/A % userDn
5826N/A </message>
5826N/A <call function="'DeleteEntry'">
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 'dsBaseDN' : userDn
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - add binary
5826N/A attribute
5826N/A #@TestID Modify Entry - add binary attribute
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Add jpegPhoto attribute to entry with binary
5826N/A value
5826N/A #@TestSteps Check add worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if add worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_016" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - add binary attribute')">
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 that a modify (add binary attribute) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filename = 'replication_mod_add_binary.ldif'
5826N/A filePath = '%s/%s' % (local.temp,filename)
5826N/A binaryFilePath = '%s/replication/photo1.uu' % source.data
5826N/A dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
5826N/A modif = 'add'
5826N/A attrType = 'jpegPhoto'
5826N/A write_replication_mod_binary_ldif_file(filePath, dn, modif,
5826N/A attrType, binaryFilePath)
5826N/A </script>
5826N/A
5826N/A <!-- Copy the replication_mod ldif to client host -->
5826N/A <message>
5826N/A 'Copy %s file from %s to %s' \
5826N/A % (filename,local.temp,client.getTmpDir())
5826N/A </message>
5826N/A <call function="'copyFile'">
5826N/A { 'srcfile' : filePath,
5826N/A 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
5826N/A 'remotehost' : client.getHostname()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "master" server -->
5826N/A <call function="'ldapModifyWithScript'">
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 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
5826N/A }
5826N/A </call>
5826N/A
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'jpegPhoto=*'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - replace
5826N/A binary attribute
5826N/A #@TestID Modify Entry - replace binary attribute
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Replace jpegPhoto (binary) attribute value
5826N/A #@TestSteps Check replace worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if replace worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_017" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - replace binary attribute')">
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 that a modify (replace binary attribute) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filename = 'replication_mod_replace_binary.ldif'
5826N/A filePath = '%s/%s' % (local.temp,filename)
5826N/A binaryFilePath = '%s/replication/photo2.uu' % source.data
5826N/A dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
5826N/A modif = 'replace'
5826N/A attrType = 'jpegPhoto'
5826N/A write_replication_mod_binary_ldif_file(filePath, dn, modif,
5826N/A attrType, binaryFilePath)
5826N/A </script>
5826N/A
5826N/A <!-- Copy the replication_mod ldif to client host -->
5826N/A <message>
5826N/A 'Copy %s file from %s to %s' \
5826N/A % (filename,local.temp,client.getTmpDir())
5826N/A </message>
5826N/A <call function="'copyFile'">
5826N/A { 'srcfile' : filePath,
5826N/A 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
5826N/A 'remotehost' : client.getHostname()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "master" server -->
5826N/A <call function="'ldapModifyWithScript'">
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 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
5826N/A }
5826N/A </call>
5826N/A
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'jpegPhoto=*'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Modify Entry - delete binary
5826N/A attribute
5826N/A #@TestID Modify Entry - delete binary attribute
5826N/A #@TestPurpose Check that an entry modify is well propagated by
5826N/A replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Delete binary attribute jpegPhoto
5826N/A #@TestSteps Check delete worked
5826N/A #@TestPostamble
5826N/A #@TestResult Success if delete worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_018" scope="local">
5826N/A <testcase name="getTestCaseName('Modify Entry - delete binary attribute')">
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 that a modify (delete binary attribute) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filename = 'replication_mod_delete_binary.ldif'
5826N/A filePath = '%s/%s' % (local.temp,filename)
5826N/A dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
5826N/A modif = 'delete'
5826N/A attrType = 'jpegPhoto'
5826N/A attrValue = None
5826N/A write_replication_mod_ldif_file(filePath, dn, modif, attrType,
5826N/A attrValue)
5826N/A </script>
5826N/A
5826N/A <!-- Copy the replication_mod ldif to client host -->
5826N/A <message>
5826N/A 'Copy %s file from %s to %s' \
5826N/A % (filename,local.temp,client.getTmpDir())
5826N/A </message>
5826N/A <call function="'copyFile'">
5826N/A { 'srcfile' : filePath,
5826N/A 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
5826N/A 'remotehost' : client.getHostname()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "master" server -->
5826N/A <call function="'ldapModifyWithScript'">
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 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'jpegPhoto=*'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 0
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Rename Entry
5826N/A #@TestID Rename Entry
5826N/A #@TestPurpose Check that a rename (modrdn) operation is well
5826N/A propagated by replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Rename entry
5826N/A #@TestSteps Check old dn entry no longer exists
5826N/A #@TestSteps Check new dn entry exists
5826N/A #@TestPostamble
5826N/A #@TestResult Success if rename worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_019" scope="local">
5826N/A <testcase name="getTestCaseName('Rename Entry')">
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 that a rename (modrdn) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filename = 'replication_modrdn.ldif'
5826N/A filePath = '%s/%s' % (local.temp,filename)
5826N/A dn = 'uid=kvaughan, ou=People,%s' % synchroSuffix
5826N/A newrdn = 'uid=kvaughan2'
5826N/A newsuperior = None
5826N/A deleteoldrdn = 1
5826N/A write_replication_moddn_ldif_file(filePath, dn, newrdn,
5826N/A newsuperior, deleteoldrdn)
5826N/A </script>
5826N/A
5826N/A <!-- Copy the replication_mod ldif to client host -->
5826N/A <message>
5826N/A 'Copy %s file from %s to %s' \
5826N/A % (filename,local.temp,client.getTmpDir())
5826N/A </message>
5826N/A <call function="'copyFile'">
5826N/A { 'srcfile' : filePath,
5826N/A 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
5826N/A 'remotehost' : client.getHostname()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "master" server -->
5826N/A <call function="'ldapModifyWithScript'">
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 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
5826N/A }
5826N/A </call>
5826N/A
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <!-- check that "uid=kvaughan, ou=People, ${DIRECTORY_BASE}" does
5826N/A NOT exist anymore -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=kvaughan, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'objectclass=*',
5826N/A 'expectedRC' : 32
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- check that new entry
5826N/A "uid=kvaughan2, ou=People, ${DIRECTORY_BASE}" exists -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=kvaughan2, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'objectclass=*'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Rename Entry (keep old rdn)
5826N/A #@TestID Rename Entry (keep old rdn)
5826N/A #@TestPurpose Check that a rename (modrdn) operation is well
5826N/A propagated by replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Rename entry
5826N/A #@TestSteps Check old dn entry no longer exists
5826N/A #@TestSteps Check new dn entry exists and contains old rdn
5826N/A #@TestPostamble
5826N/A #@TestResult Success if rename worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_020" scope="local">
5826N/A <testcase name="getTestCaseName('Rename Entry - keep old rdn')">
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 that a rename (keep old rdn) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filename = 'replication_modrdn_preserve.ldif'
5826N/A filePath = '%s/%s' % (local.temp,filename)
5826N/A dn = 'uid=jwallace, ou=People,%s' % synchroSuffix
5826N/A newrdn = 'uid=igueye'
5826N/A newsuperior = None
5826N/A deleteoldrdn = 0
5826N/A write_replication_moddn_ldif_file(filePath, dn, newrdn,
5826N/A newsuperior, deleteoldrdn)
5826N/A </script>
5826N/A
5826N/A <!-- Copy the replication_mod ldif to client host -->
5826N/A <message>
5826N/A 'Copy %s file from %s to %s' \
5826N/A % (filename,local.temp,client.getTmpDir())
5826N/A </message>
5826N/A <call function="'copyFile'">
5826N/A { 'srcfile' : filePath,
5826N/A 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
5826N/A 'remotehost' : client.getHostname()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "master" server -->
5826N/A <call function="'ldapModifyWithScript'">
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 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
5826N/A }
5826N/A </call>
5826N/A
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <!-- check that "uid=jwallace, ou=People, ${DIRECTORY_BASE}" does
5826N/A NOT exist anymore -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'objectclass=*',
5826N/A 'expectedRC' : 32
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- check that new entry
5826N/A "uid=igueye, ou=People, ${DIRECTORY_BASE}" exists -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=igueye, ou=People,%s' % synchroSuffix,
5826N/A 'dsFilter' : 'uid=jwallace'
5826N/A }
5826N/A </call>
5826N/A <script>
5826N/A searchRC = STAXResult[0][0]
5826N/A searchResult = STAXResult[0][1]
5826N/A resultLength = len(searchResult) > 0
5826N/A </script>
5826N/A <call function="'checktestRC'">
5826N/A { 'returncode' : resultLength,
5826N/A 'result' : searchResult,
5826N/A 'expected' : 1
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Rename Subtree
5826N/A #@TestID Rename Subtree
5826N/A #@TestPurpose Check that a subtree rename (moddn) operation is
5826N/A well propagated by replication.
5826N/A #@TestPreamble
5826N/A #@TestSteps Rename subtree
5826N/A #@TestSteps Check old subtree no longer exists
5826N/A #@TestSteps Check new subree exists
5826N/A #@TestPostamble
5826N/A #@TestResult Success if rename worked and trees synchronised
5826N/A over the topology
5826N/A -->
5826N/A <function name="replication_basic_021" scope="local">
5826N/A <testcase name="getTestCaseName('Rename Subtree')">
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 that a subtree rename (moddn) is replicated.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A filename = 'replication_moddn.ldif'
5826N/A filePath = '%s/%s' % (local.temp,filename)
5826N/A dn = 'ou=People,%s' % synchroSuffix
5826N/A newrdn = 'ou=Special People'
5826N/A newsuperior = 'ou=Special Users,%s' % synchroSuffix
5826N/A deleteoldrdn = 0
5826N/A write_replication_moddn_ldif_file(filePath, dn, newrdn,
5826N/A newsuperior, deleteoldrdn)
5826N/A </script>
5826N/A
5826N/A <!-- Copy the replication_mod ldif to client host -->
5826N/A <message>
5826N/A 'Copy %s file from %s to %s' \
5826N/A % (filename,local.temp,client.getTmpDir())
5826N/A </message>
5826N/A <call function="'copyFile'">
5826N/A { 'srcfile' : filePath,
5826N/A 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
5826N/A 'remotehost' : client.getHostname()
5826N/A }
5826N/A </call>
5826N/A
5826N/A <!-- Modify "master" server -->
5826N/A <call function="'ldapModifyWithScript'">
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 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
5826N/A }
5826N/A </call>
5826N/A
5826N/A
5826N/A <!-- Check modify worked on "master" server -->
5826N/A <!-- check that "uid=gfarmer, ou=People, ${DIRECTORY_BASE}" does
5826N/A NOT exist anymore -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : 'uid=gfarmer, ou=People,%s' \
5826N/A % synchroSuffix,
5826N/A 'dsFilter' : 'objectclass=*',
5826N/A 'expectedRC' : 32
5826N/A }
5826N/A </call>
5826N/A
5826N/A <script>
5826N/A base = 'uid=gfarmer, ou=Special People, ou=Special Users,%s' \
5826N/A % synchroSuffix
5826N/A </script>
5826N/A <!-- check that new entry
5826N/A "uid=gfarmer, ou=Special People, ou=Special Users,
5826N/A ${DIRECTORY_BASE}" exists -->
5826N/A <call function="'ldapSearchWithScript'">
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 'dsBaseDN' : base,
5826N/A 'dsFilter' : 'objectclass=*'
5826N/A }
5826N/A </call>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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
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 <!--- Test Case information
5826N/A #@TestMarker Replication Basic Tests
5826N/A #@TestName Replication: Basic: Add entry after restart
5826N/A #@TestID Add entry after restart
5826N/A #@TestPurpose Check entry add over secured replication after
5826N/A server restart
5826N/A #@TestPreamble
5826N/A #@TestSteps Restart servers
5826N/A #@TestSteps Add entry
5826N/A #@TestPostamble
5826N/A #@TestResult Success if trees synchronised over the topology
5826N/A -->
5826N/A <function name="replication_basic_022" scope="local">
5826N/A <testcase name="getTestCaseName('Add entry after restart')">
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 entry add over secured replication after server restart.' % msg1 }
5826N/A </call>
5826N/A
5826N/A <!-- Stop the servers in the topology -->
5826N/A <call function="'stopServers'">
5826N/A [_splitServerList]
5826N/A </call>
5826N/A
5826N/A <!-- Start the servers in the topology -->
5826N/A <call function="'startServers'">
5826N/A [_splitServerList]
5826N/A </call>
5826N/A
5826N/A <iterate var="server" in="_topologyServerList" indexvar="i">
5826N/A <sequence>
5826N/A <script>
5826N/A serverPath = '%s/%s' % (server.getDir(), OPENDSNAME)
5826N/A userDn = 'uid=RESTART-iabizen-%s, %s' % \
5826N/A (i,synchroSuffix)
5826N/A </script>
5826N/A
5826N/A <!-- Add entry to one of the other servers -->
5826N/A <script>
5826N/A listAttr = []
5826N/A listAttr.append('objectclass:top')
5826N/A listAttr.append('objectclass:organizationalperson')
5826N/A listAttr.append('objectclass:inetorgperson')
5826N/A listAttr.append('objectclass:person')
5826N/A listAttr.append('givenname:Izen-%s' % i)
5826N/A listAttr.append('sn:Abizen-%s' % i)
5826N/A listAttr.append('cn:Izen-%s Abizen-%s' % (i, i))
5826N/A listAttr.append('l:ICNC')
5826N/A </script>
5826N/A
5826N/A <call function="'addAnEntry'">
5826N/A { 'location' : server.getHostname(),
5826N/A 'dsPath' : serverPath,
5826N/A 'dsInstanceHost' : server.getHostname(),
5826N/A 'dsInstancePort' : server.getPort(),
5826N/A 'dsInstanceDn' : server.getRootDn(),
5826N/A 'dsInstancePswd' : server.getRootPwd(),
5826N/A 'DNToAdd' : userDn,
5826N/A 'listAttributes' : listAttr
5826N/A }
5826N/A </call>
5826N/A
5826N/A </sequence>
5826N/A </iterate>
5826N/A
5826N/A <call function="'testStep'">
5826N/A { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % 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>