8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams<?xml version="1.0" encoding="UTF-8" standalone="no"?>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams<!--
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! CDDL HEADER START
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams !
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! The contents of this file are subject to the terms of the
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! Common Development and Distribution License, Version 1.0 only
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! (the "License"). You may not use this file except in compliance
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! with the License.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams !
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! or http://forgerock.org/license/CDDLv1.0.html.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! See the License for the specific language governing permissions
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! and limitations under the License.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams !
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! When distributing Covered Code, include this CDDL HEADER in each
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! file and include the License file at legal-notices/CDDLv1_0.txt.
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! If applicable, add the following below this CDDL HEADER, with the
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! fields enclosed by brackets "[]" replaced with your own identifying
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! information:
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! Portions Copyright [yyyy] [name of copyright owner]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams !
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! CDDL HEADER END
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams !
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! Copyright 2007-2010 Sun Microsystems, Inc.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! Portions Copyright 2011-2012 ForgeRock AS.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ! -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams<stax>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Add Entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Add Entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry add is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add root suffix entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if trees synchronised over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_001" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Add Entry')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that an add of an entry is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'addEntry'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'entryToBeAdded' : '%s/replication_add_root_suffix.ldif' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % client.getTmpDir()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add entry on server
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Modify entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check modify worked on server
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if modify worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_002" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify of an entry is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'addEntry'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'entryToBeAdded' : '%s/replication_add_single.ldif' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % client.getTmpDir()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapModifyWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilename' : '%s/replication_mod.ldif' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % client.getTmpDir()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : entryDn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : '%s=%s' % (attr_type,attr_value)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Delete Entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Delete Entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry delete is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Delete entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check delete worked on server
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if delete worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_003" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Delete Entry')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a delete of an entry is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'DeleteEntry'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : entryDn
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : entryDn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'objectclass=*',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expectedRC' : 32
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Add Multiple Entries
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Add Multiple Entries
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that a multiple-entry add is well
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams propagated by replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble Delete root suffix entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add multiple entries
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if trees synchronised over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_004" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Add Multiple Entries')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that multiple adds of an entry are replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Delete the root entry, as it is already present in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams Example.ldif file -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'DeleteEntry'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'addEntry'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'entryToBeAdded' : '%s/replication/Example.ldif' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % master.getDataDir()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - add single
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - add single attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add description attribute to entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check modify worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if modify worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_005" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - add single attribute')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (add single attribute) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : 'uid=tmorris, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'attributeName' : 'description',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'newAttributeValue' : ' ',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'add'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=tmorris, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'description=*'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - add single
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams value
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - add single value
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add single-valued attribute to entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check modify worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if modify worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_006" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - add single value')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (add single value) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : 'uid=tmorris, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'attributeName' : 'departmentnumber',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'newAttributeValue' : '5203214400',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'add'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=tmorris, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'departmentnumber=5203214400'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - delete single
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - delete single attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Delete attribute in entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check delete worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if delete worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_007" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - delete single attribute')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (delete single attribute) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filename = 'replication_mod_delete.ldif'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filePath = '%s/%s' % (local.temp,filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams dn = 'uid=smason, ou=People,%s' % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams modif = 'delete'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrType = 'roomNumber'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrValue = None
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams write_replication_mod_ldif_file(filePath, dn, modif, attrType,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrValue)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Copy the replication_mod ldif to client host -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Copy %s file from %s to %s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % (filename,local.temp,client.getTmpDir())
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'copyFile'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'srcfile' : filePath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'remotehost' : client.getHostname()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapModifyWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=smason, ou=People,%s' % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'roomNumber=*'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - delete single
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams value
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - delete single value
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Delete single attribute value in entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check delete worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if delete worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_008" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - delete single value')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (delete single value) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : 'uid=jwalker, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'attributeName' : 'roomNumber',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'newAttributeValue' : '3915',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'delete'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=jwalker, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'roomNumber=3915'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - add multiple
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams values
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - add multiple values
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add multiple-valued attribute to entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check add worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if add worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_009" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - add multiple values')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (add multiple values) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToAdd = []
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToAdd.append('postaladdress:Residence Parc Europe')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToAdd.append('postaladdress:Appartement #6')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToAdd.append('postaladdress:31 Rue General Mangin')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToAdd.append('postaladdress:38100 Grenoble')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'listAttributes' : valuesToAdd,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'add'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filter1 = '(postaladdress=Residence Parc Europe)'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filter2 = '(postaladdress=Appartement #6)'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filter3 = '(postaladdress=31 Rue General Mangin)'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filter4 = '(postaladdress=38100 Grenoble)'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : '&amp;%s%s%s%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % (filter1, filter2, filter3, filter4)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - delete
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams multiple values
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - delete multiple values
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Delete multiple values in same attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check delete worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if delete worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_010" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - delete multiple values')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (delete multiple values) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToDelete = []
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToDelete.append('postaladdress:Appartement #6')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToDelete.append('postaladdress:38100 Grenoble')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'listAttributes' : valuesToDelete,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'delete'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filter1 = '(postaladdress=Appartement #6)'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filter2 = '(postaladdress=38100 Grenoble)'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : '|%s%s' % (filter1, filter2)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - replace
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams multiple values
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - replace multiple values
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Replace multiple values in same attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check replace worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if replace worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_011" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - replace multiple values')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (replace multiple values) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToReplace = []
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToReplace.append('postaladdress: Residence Letilleuil')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToReplace.append('postaladdress: 18 rue Nicolas Chorier')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'listAttributes' : valuesToReplace,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'replace'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filter1 = '(postaladdress=Residence Letilleuil)'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filter2 = '(postaladdress=18 rue Nicolas Chorier)'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : '&amp;%s%s' % (filter1, filter2)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - add single
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams value to multiple valued attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - add single value to multiple
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valued attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add single value to multiple-valued attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check value add worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if value add worked and trees
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams synchronised over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_012" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - add single value to multiple valued attribute')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (add single value to multiple valued attribute) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToAdd = []
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToAdd.append('postaladdress:38000 Grenoble')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'listAttributes' : valuesToAdd,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'add'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'postaladdress=38000 Grenoble'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - delete single
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams value from multiple valued attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - delete single value from multiple
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valued attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Delete single value from multiple-valued
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check value delete worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if value delete worked and trees
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams synchronised over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_013" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - delete single value from multiple valued attribute')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (delete single value from multiple valued attribute) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToDelete = []
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToDelete.append('postaladdress: Residence Letilleuil')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'listAttributes' : valuesToDelete,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'delete'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'postaladdress=Residence Letilleuil'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - replace case
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams sensitive attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - replace case sensitive attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that case sensitive attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams modifications are replicated.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Replace description attribute in entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check replace worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if replace worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_014" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - replace case sensitive attribute')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (replace case sensitive attribute) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'addEntry'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'entryToBeAdded' : '%s/replication/tfitter.ldif' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % master.getDataDir()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams value = 'Profession Tap Fitter and Plumber'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToReplace = []
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams valuesToReplace.append('description: %s' % value)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : 'uid=tfitter, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'listAttributes' : valuesToReplace,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'replace'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filter = 'description=%s' % value
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=tfitter, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : filter
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - replace
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams userpassword
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - replace userpassword
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check replaced userpasswords are replicated.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add user entry on server A
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Bind as user with userpassword to server A
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Replace user's userpassword
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Bind as user with old userpassword to server B
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Bind as user with new userpassword to server B
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if bind with old userpassword fails with
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams LDAP_INVALID_CREDENTIALS error and bind with new
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams user password suceeds and trees are synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_015" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - replace userpassword')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (replace userpassword) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Add entry to "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams userDn = 'uid=pmoriarty, ou=People, %s' % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams oldPassword = 'jajejijoju'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newPassword = 'JUAJUAJUA'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr = []
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('objectclass:top')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('objectclass:organizationalperson')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('objectclass:inetorgperson')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('objectclass:person')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('givenname:Professor')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('sn:Moriarty')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('cn:Professor Moriarty')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('l:London')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('userpassword:%s' % oldPassword)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'replace userpassword: add user entry %s' % userDn
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'addAnEntry'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToAdd' : userDn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'listAttributes' : listAttr
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check userDn can bind with oldPassword on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'replace userpassword: bind on master using password %s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % oldPassword
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : userDn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : oldPassword,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'objectclass=*'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Replace userDn's oldPassword with newPassword on "master"
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'replace userpassword: replace user password %s with %s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % (oldPassword, newPassword)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'modifyAnAttribute'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : masterPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToModify' : userDn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'attributeName' : 'userpassword',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'newAttributeValue' : 'JUAJUAJUA',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'changetype' : 'replace'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams consumer = consumerList[0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Try binding as userDn with oldPassword on "consumer" server:
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ==> should fail with LDAP_INVALID_CREDENTIALS (49) error -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'replace userpassword: bind on consumer using old password %s :\
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams should fail with error LDAP_INVALID_CREDENTIALS (49)' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % oldPassword
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : consumer.getHostname(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : consumer.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : userDn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : oldPassword,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'objectclass=*',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expectedRC' : 49
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check userDn can bind with newPassword on "consumer"
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'replace userpassword: bind on consumer using new password %s :\
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams should pass' % newPassword
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : consumer.getHostname(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : consumer.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : userDn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : newPassword,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'objectclass=*'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Delete added entry as clean-up measure -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'replace userpassword: delete user entry %s on master' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % userDn
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'DeleteEntry'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : userDn
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - add binary
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - add binary attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add jpegPhoto attribute to entry with binary
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams value
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check add worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if add worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_016" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - add binary attribute')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (add binary attribute) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filename = 'replication_mod_add_binary.ldif'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filePath = '%s/%s' % (local.temp,filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams binaryFilePath = '%s/replication/photo1.uu' % source.data
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams modif = 'add'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrType = 'jpegPhoto'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams write_replication_mod_binary_ldif_file(filePath, dn, modif,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrType, binaryFilePath)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Copy the replication_mod ldif to client host -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Copy %s file from %s to %s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % (filename,local.temp,client.getTmpDir())
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'copyFile'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'srcfile' : filePath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'remotehost' : client.getHostname()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapModifyWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'jpegPhoto=*'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - replace
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams binary attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - replace binary attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Replace jpegPhoto (binary) attribute value
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check replace worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if replace worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_017" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - replace binary attribute')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (replace binary attribute) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filename = 'replication_mod_replace_binary.ldif'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filePath = '%s/%s' % (local.temp,filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams binaryFilePath = '%s/replication/photo2.uu' % source.data
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams modif = 'replace'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrType = 'jpegPhoto'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams write_replication_mod_binary_ldif_file(filePath, dn, modif,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrType, binaryFilePath)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Copy the replication_mod ldif to client host -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Copy %s file from %s to %s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % (filename,local.temp,client.getTmpDir())
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'copyFile'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'srcfile' : filePath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'remotehost' : client.getHostname()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapModifyWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'jpegPhoto=*'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Modify Entry - delete binary
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Modify Entry - delete binary attribute
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that an entry modify is well propagated by
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Delete binary attribute jpegPhoto
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check delete worked
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if delete worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_018" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Modify Entry - delete binary attribute')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a modify (delete binary attribute) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filename = 'replication_mod_delete_binary.ldif'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filePath = '%s/%s' % (local.temp,filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams modif = 'delete'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrType = 'jpegPhoto'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrValue = None
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams write_replication_mod_ldif_file(filePath, dn, modif, attrType,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams attrValue)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Copy the replication_mod ldif to client host -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Copy %s file from %s to %s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % (filename,local.temp,client.getTmpDir())
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'copyFile'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'srcfile' : filePath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'remotehost' : client.getHostname()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapModifyWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'jpegPhoto=*'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Rename Entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Rename Entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that a rename (modrdn) operation is well
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams propagated by replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Rename entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check old dn entry no longer exists
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check new dn entry exists
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if rename worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_019" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Rename Entry')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a rename (modrdn) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filename = 'replication_modrdn.ldif'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filePath = '%s/%s' % (local.temp,filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams dn = 'uid=kvaughan, ou=People,%s' % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newrdn = 'uid=kvaughan2'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newsuperior = None
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams deleteoldrdn = 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams write_replication_moddn_ldif_file(filePath, dn, newrdn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newsuperior, deleteoldrdn)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Copy the replication_mod ldif to client host -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Copy %s file from %s to %s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % (filename,local.temp,client.getTmpDir())
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'copyFile'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'srcfile' : filePath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'remotehost' : client.getHostname()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapModifyWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd() ,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- check that "uid=kvaughan, ou=People, ${DIRECTORY_BASE}" does
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams NOT exist anymore -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=kvaughan, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'objectclass=*',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expectedRC' : 32
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- check that new entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams "uid=kvaughan2, ou=People, ${DIRECTORY_BASE}" exists -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=kvaughan2, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'objectclass=*'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Rename Entry (keep old rdn)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Rename Entry (keep old rdn)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that a rename (modrdn) operation is well
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams propagated by replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Rename entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check old dn entry no longer exists
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check new dn entry exists and contains old rdn
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if rename worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_020" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Rename Entry - keep old rdn')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a rename (keep old rdn) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filename = 'replication_modrdn_preserve.ldif'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filePath = '%s/%s' % (local.temp,filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams dn = 'uid=jwallace, ou=People,%s' % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newrdn = 'uid=igueye'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newsuperior = None
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams deleteoldrdn = 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams write_replication_moddn_ldif_file(filePath, dn, newrdn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newsuperior, deleteoldrdn)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Copy the replication_mod ldif to client host -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Copy %s file from %s to %s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % (filename,local.temp,client.getTmpDir())
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'copyFile'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'srcfile' : filePath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'remotehost' : client.getHostname()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapModifyWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- check that "uid=jwallace, ou=People, ${DIRECTORY_BASE}" does
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams NOT exist anymore -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'objectclass=*',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expectedRC' : 32
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- check that new entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams "uid=igueye, ou=People, ${DIRECTORY_BASE}" exists -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=igueye, ou=People,%s' % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'uid=jwallace'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchRC = STAXResult[0][0]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams searchResult = STAXResult[0][1]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams resultLength = len(searchResult) > 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'checktestRC'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'returncode' : resultLength,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'result' : searchResult,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expected' : 1
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Rename Subtree
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Rename Subtree
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check that a subtree rename (moddn) operation is
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams well propagated by replication.
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Rename subtree
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check old subtree no longer exists
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Check new subree exists
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if rename worked and trees synchronised
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_021" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Rename Subtree')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check that a subtree rename (moddn) is replicated.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filename = 'replication_moddn.ldif'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams filePath = '%s/%s' % (local.temp,filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams dn = 'ou=People,%s' % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newrdn = 'ou=Special People'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newsuperior = 'ou=Special Users,%s' % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams deleteoldrdn = 0
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams write_replication_moddn_ldif_file(filePath, dn, newrdn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams newsuperior, deleteoldrdn)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Copy the replication_mod ldif to client host -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Copy %s file from %s to %s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % (filename,local.temp,client.getTmpDir())
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'copyFile'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'srcfile' : filePath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'destfile' : '%s/%s' % (client.getTmpDir(),filename),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'remotehost' : client.getHostname()
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Modify "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapModifyWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Check modify worked on "master" server -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- check that "uid=gfarmer, ou=People, ${DIRECTORY_BASE}" does
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams NOT exist anymore -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : 'uid=gfarmer, ou=People,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'objectclass=*',
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'expectedRC' : 32
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams base = 'uid=gfarmer, ou=Special People, ou=Special Users,%s' \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams % synchroSuffix
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- check that new entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams "uid=gfarmer, ou=Special People, ou=Special Users,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams ${DIRECTORY_BASE}" exists -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'ldapSearchWithScript'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : clientHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : clientPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : masterHost,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : master.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : master.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : master.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsBaseDN' : base,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsFilter' : 'objectclass=*'
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!--- Test Case information
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestMarker Replication Basic Tests
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestName Replication: Basic: Add entry after restart
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestID Add entry after restart
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPurpose Check entry add over secured replication after
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams server restart
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPreamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Restart servers
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestSteps Add entry
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestPostamble
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams #@TestResult Success if trees synchronised over the topology
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <function name="replication_basic_022" scope="local">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <testcase name="getTestCaseName('Add entry after restart')">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Preamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'Test Name = %s' % STAXCurrentTestcase
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Check entry add over secured replication after server restart.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Stop the servers in the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'stopServers'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [_splitServerList]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Start the servers in the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'startServers'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [_splitServerList]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <iterate var="server" in="_topologyServerList" indexvar="i">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams serverPath = '%s/%s' % (server.getDir(), OPENDSNAME)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams userDn = 'uid=RESTART-iabizen-%s, %s' % \
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams (i,synchroSuffix)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Add entry to one of the other servers -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr = []
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('objectclass:top')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('objectclass:organizationalperson')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('objectclass:inetorgperson')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('objectclass:person')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('givenname:Izen-%s' % i)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('sn:Abizen-%s' % i)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('cn:Izen-%s Abizen-%s' % (i, i))
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams listAttr.append('l:ICNC')
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </script>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'addAnEntry'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'location' : server.getHostname(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsPath' : serverPath,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceHost' : server.getHostname(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePort' : server.getPort(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstanceDn' : server.getRootDn(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'dsInstancePswd' : server.getRootPwd(),
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'DNToAdd' : userDn,
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams 'listAttributes' : listAttr
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </iterate>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testStep'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams { 'stepMessage' : '%s Verify synchronization of servers in the topology.' % msg1 }
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <!-- Verify the synchronization of the trees among the servers in
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams the topology -->
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'verifyTrees'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </call>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <message log="1" level="'fatal'">
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </message>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </catch>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams <call function="'testCase_Postamble'"/>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </finally>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </try>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </sequence>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </testcase>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams </function>
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams
8fc236b9a04ca8cf4a6ee748cc701210ce4910d6gary.williams</stax>