2N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
2N/A ! The contents of this file are subject to the terms of the 2N/A ! Common Development and Distribution License, Version 1.0 only 2N/A ! (the "License"). You may not use this file except in compliance 2N/A ! You can obtain a copy of the license at 2N/A ! See the License for the specific language governing permissions 2N/A ! and limitations under the License. 2N/A ! When distributing Covered Code, include this CDDL HEADER in each 2N/A ! file and include the License file at 2N/A ! add the following below this CDDL HEADER, with the fields enclosed 2N/A ! by brackets "[]" replaced with your own identifying information: 2N/A ! Portions Copyright [yyyy] [name of copyright owner] 2N/A ! Copyright 2007-2008 Sun Microsystems, Inc. 2N/A <
defaultcall function="replication_basic"/>
2N/A <
function name="replication_basic">
2N/A <
block name="'basic'">
2N/A CurrentTestPath['group']='replication'
2N/A CurrentTestPath['suite']=STAXCurrentBlock
2N/A <
call function="'testSuite_Preamble'"/>
<!--- Test Suite information #@TestSuiteName Replication Basic Tests #@TestSuitePurpose Verify that the basic operations are replicated correctly between two serrvers. #@TestSuiteID Basic Tests <
import machine="STAF_LOCAL_HOSTNAME" <
call function="'replication_setup'" />
<
import machine="STAF_LOCAL_HOSTNAME" <
call function="'replication_basic_setup'" />
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Add Entry #@TestPurpose Check that an entry add is well propagated by #@TestSteps Add root suffix entry #@TestResult Success if trees synchronised over the topology <
testcase name="getTestCaseName('Add Entry')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Add Entry. Check that an added entry is \
well propagated by replication.'
<!-- Modify "master" server --> <
call function="'addEntry'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Add entry on server #@TestSteps Check modify worked on server #@TestResult Success if modify worked and trees synchronised <
testcase name="getTestCaseName('Modify Entry')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry. Check that an entry modify \
is well propagated by replication.'
<!-- Modify "master" server --> <
call function="'addEntry'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
<
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsFilter' : '%s=%s' % (attr_type,attr_value)
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Delete Entry #@TestPurpose Check that an entry delete is well propagated by #@TestSteps Check delete worked on server #@TestResult Success if delete worked and trees synchronised <
testcase name="getTestCaseName('Delete Entry')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Delete Entry. Check that an entry delete \
is well propagated by replication.'
<!-- Modify "master" server --> <
call function="'DeleteEntry'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsFilter' : 'objectclass=*',
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Add Multiple Entries #@TestID Add Multiple Entries #@TestPurpose Check that a multiple-entry add is well propagated by replication. #@TestPreamble Delete root suffix entry #@TestSteps Add multiple entries #@TestResult Success if trees synchronised over the topology <
testcase name="getTestCaseName('Add Multiple Entries')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Add Multiple Entries. Check that a \
multiple-entry add is well propagated by replication.'
<!-- Delete the root entry, as it is already present in <
call function="'DeleteEntry'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : synchroSuffix
<!-- Modify "master" server --> <
call function="'addEntry'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - add single #@TestID Modify Entry - add single attribute #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Add description attribute to entry #@TestSteps Check modify worked #@TestResult Success if modify worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - add single attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - add single attribute. \
Check that an entry modify is well propagated by replication.'
<!-- Modify "master" server --> <
call function="'modifyAnAttribute'">
'dsInstanceHost' : masterHost ,
'DNToModify' : 'uid=tmorris, ou=People,%s' \
'attributeName' : 'description',
'newAttributeValue' : ' ',
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=tmorris, ou=People,%s' \
'dsFilter' : 'description=*'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - add single #@TestID Modify Entry - add single value #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Add single-valued attribute to entry #@TestSteps Check modify worked #@TestResult Success if modify worked and trees synchronised <
testcase name="getTestCaseName('Modify Entry - add single value')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - add single value. Check \
that an entry modify is well propagated by replication.'
<!-- Modify "master" server --> <
call function="'modifyAnAttribute'">
'dsInstanceHost' : masterHost ,
'DNToModify' : 'uid=tmorris, ou=People,%s' \
'attributeName' : 'departmentnumber',
'newAttributeValue' : '5203214400',
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=tmorris, ou=People,%s' \
'dsFilter' : 'departmentnumber=5203214400'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - delete single #@TestID Modify Entry - delete single attribute #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Delete attribute in entry #@TestSteps Check delete worked #@TestResult Success if delete worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - delete single attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - delete single attribute. \
Check that an entry modify is well propagated by replication.'
dn = 'uid=smason, ou=People,%s' % synchroSuffix
write_replication_mod_ldif_file(filePath, dn, modif, attrType,
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' \
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=smason, ou=People,%s' % synchroSuffix,
'dsFilter' : 'roomNumber=*'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - delete single #@TestID Modify Entry - delete single value #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Delete single attribute value in entry #@TestSteps Check delete worked #@TestResult Success if delete worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - delete single value')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - delete single value. \
Check that an entry modify is well propagated by replication.'
<!-- Modify "master" server --> <
call function="'modifyAnAttribute'">
'dsInstanceHost' : masterHost ,
'DNToModify' : 'uid=jwalker, ou=People,%s' \
'attributeName' : 'roomNumber',
'newAttributeValue' : '3915',
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=jwalker, ou=People,%s' \
'dsFilter' : 'roomNumber=3915'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - add multiple #@TestID Modify Entry - add multiple values #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Add multiple-valued attribute to entry #@TestSteps Check add worked #@TestResult Success if add worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - add multiple values')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - add multiple values. \
Check that an entry modify is well propagated by replication.'
<!-- Modify "master" server --> <
call function="'modifyAnAttribute'">
'dsInstanceHost' : masterHost,
'DNToModify' : 'uid=jwallace, ou=People,%s' \
'listAttributes' : valuesToAdd,
filter1 = '(postaladdress=Residence Parc Europe)'
filter2 = '(postaladdress=Appartement #6)'
filter3 = '(postaladdress=31 Rue General Mangin)'
filter4 = '(postaladdress=38100 Grenoble)'
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
'dsFilter' : '&%s%s%s%s' \
% (filter1, filter2, filter3, filter4)
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - delete #@TestID Modify Entry - delete multiple values #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Delete multiple values in same attribute #@TestSteps Check delete worked #@TestResult Success if delete worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - delete multiple values')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - delete multiple values. \
Check that an entry modify is well propagated by replication.'
<!-- Modify "master" server --> <
call function="'modifyAnAttribute'">
'dsInstanceHost' : masterHost ,
'DNToModify' : 'uid=jwallace, ou=People,%s' \
'listAttributes' : valuesToDelete,
filter1 = '(postaladdress=Appartement #6)'
filter2 = '(postaladdress=38100 Grenoble)'
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
'dsFilter' : '|%s%s' % (filter1, filter2)
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - replace #@TestID Modify Entry - replace multiple values #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Replace multiple values in same attribute #@TestSteps Check replace worked #@TestResult Success if replace worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - replace multiple values')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - replace multiple values. \
Check that an entry modify is well propagated by replication.'
<!-- Modify "master" server --> <
call function="'modifyAnAttribute'">
'dsInstanceHost' : masterHost ,
'DNToModify' : 'uid=jwallace, ou=People,%s' \
'listAttributes' : valuesToReplace,
filter1 = '(postaladdress=Residence Letilleuil)'
filter2 = '(postaladdress=18 rue Nicolas Chorier)'
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
'dsFilter' : '&%s%s' % (filter1, filter2)
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - add single value to multiple valued attribute #@TestID Modify Entry - add single value to multiple #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Add single value to multiple-valued attribute #@TestSteps Check value add worked #@TestResult Success if value add worked and trees synchronised over the topology <
testcase name="getTestCaseName ('Modify Entry - add single value to multiple valued attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - add single value to \
multiple valued attribute. Check that an entry modify is well \
propagated by replication.'
<!-- Modify "master" server --> <
call function="'modifyAnAttribute'">
'dsInstanceHost' : masterHost ,
'DNToModify' : 'uid=jwallace, ou=People,%s' \
'listAttributes' : valuesToAdd,
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
'dsFilter' : 'postaladdress=38000 Grenoble'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - delete single value from multiple valued attribute #@TestID Modify Entry - delete single value from multiple #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Delete single value from multiple-valued #@TestSteps Check value delete worked #@TestResult Success if value delete worked and trees synchronised over the topology <
testcase name="getTestCaseName ('Modify Entry - delete single value from multiple valued attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - delete single value from \
multiple valued attribute. Check that an entry modify is well \
propagated by replication.'
<!-- Modify "master" server --> <
call function="'modifyAnAttribute'">
'dsInstanceHost' : masterHost ,
'DNToModify' : 'uid=jwallace, ou=People,%s' \
'listAttributes' : valuesToDelete,
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
'dsFilter' : 'postaladdress=Residence Letilleuil'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - replace case #@TestID Modify Entry - replace case sensitive attribute #@TestPurpose Check that case sensitive attribute modifications are replicated. #@TestSteps Replace description attribute in entry #@TestSteps Check replace worked #@TestResult Success if replace worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - replace case sensitive attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - replace case sensitive \
attribute. Check that case sensitive attribute modifications \
<!-- Modify "master" server --> <
call function="'addEntry'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
value = 'Profession Tap Fitter and Plumber'
<
call function="'modifyAnAttribute'">
'dsInstanceHost' : masterHost,
'DNToModify' : 'uid=tfitter, ou=People,%s' \
'listAttributes' : valuesToReplace,
filter = 'description=%s' % value
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=tfitter, ou=People,%s' \
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - replace #@TestID Modify Entry - replace userpassword #@TestPurpose Check replaced userpasswords are replicated. #@TestSteps Add user entry on server A #@TestSteps Bind as user with userpassword to server A #@TestSteps Replace user's userpassword #@TestSteps Bind as user with old userpassword to server B #@TestSteps Bind as user with new userpassword to server B #@TestResult Success if bind with old userpassword fails with LDAP_INVALID_CREDENTIALS error and bind with new user password suceeds and trees are synchronised <
testcase name="getTestCaseName ('Modify Entry - replace userpassword')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - replace userpassword. \
Check replaced userpasswords are replicated.'
<!-- Add entry to "master" server --> userDn = 'uid=pmoriarty, ou=People, %s' % synchroSuffix
oldPassword = 'jajejijoju'
newPassword = 'JUAJUAJUA'
'replace userpassword: add user entry %s' % userDn
<
call function="'addAnEntry'">
{ 'location' : masterHost,
'dsInstanceHost' : masterHost,
'listAttributes' : listAttr
<!-- Check userDn can bind with oldPassword on "master" server --> 'replace userpassword: bind on master using password %s' \
<
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsInstancePswd' : oldPassword,
'dsBaseDN' : synchroSuffix,
'dsFilter' : 'objectclass=*'
<!-- Replace userDn's oldPassword with newPassword on "master" 'replace userpassword: replace user password %s with %s' \
% (oldPassword, newPassword)
<
call function="'modifyAnAttribute'">
{ 'location' : masterHost,
'dsInstanceHost' : masterHost,
'attributeName' : 'userpassword',
'newAttributeValue' : 'JUAJUAJUA',
consumer = consumerList[0]
<!-- Try binding as userDn with oldPassword on "consumer" server: ==> should fail with LDAP_INVALID_CREDENTIALS (49) error --> 'replace userpassword: bind on consumer using old password %s :\
should fail with error LDAP_INVALID_CREDENTIALS (49)' \
<
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstancePswd' : oldPassword,
'dsBaseDN' : synchroSuffix,
'dsFilter' : 'objectclass=*',
<!-- Check userDn can bind with newPassword on "consumer" 'replace userpassword: bind on consumer using new password %s :\
should pass' % newPassword
<
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstancePswd' : newPassword,
'dsBaseDN' : synchroSuffix,
'dsFilter' : 'objectclass=*'
<!-- Delete added entry as clean-up measure --> 'replace userpassword: delete user entry %s on master' \
<
call function="'DeleteEntry'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - add binary #@TestID Modify Entry - add binary attribute #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Add jpegPhoto attribute to entry with binary #@TestSteps Check add worked #@TestResult Success if add worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - add binary attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - add binary attribute. \
Check that an entry modify is well propagated by replication.'
dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
write_replication_mod_binary_ldif_file(filePath, dn, modif,
attrType, binaryFilePath)
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' \
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
'dsFilter' : 'jpegPhoto=*'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - replace #@TestID Modify Entry - replace binary attribute #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Replace jpegPhoto (binary) attribute value #@TestSteps Check replace worked #@TestResult Success if replace worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - replace binary attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - replace binary attribute. \
Check that an entry modify is well propagated by replication.'
dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
write_replication_mod_binary_ldif_file(filePath, dn, modif,
attrType, binaryFilePath)
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' \
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
'dsFilter' : 'jpegPhoto=*'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Modify Entry - delete binary #@TestID Modify Entry - delete binary attribute #@TestPurpose Check that an entry modify is well propagated by #@TestSteps Delete binary attribute jpegPhoto #@TestSteps Check delete worked #@TestResult Success if delete worked and trees synchronised <
testcase name="getTestCaseName ('Modify Entry - delete binary attribute')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Modify Entry - delete binary attribute. \
Check that an entry modify is well propagated by replication.'
dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
write_replication_mod_ldif_file(filePath, dn, modif, attrType,
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' \
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
'dsFilter' : 'jpegPhoto=*'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Rename Entry #@TestPurpose Check that a rename (modrdn) operation is well propagated by replication. #@TestSteps Check old dn entry no longer exists #@TestSteps Check new dn entry exists #@TestResult Success if rename worked and trees synchronised <
testcase name="getTestCaseName('Rename Entry')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Rename Entry. Check that a rename \
(modrdn) operation is well propagated by replication.'
dn = 'uid=kvaughan, ou=People,%s' % synchroSuffix
write_replication_moddn_ldif_file(filePath, dn, newrdn,
newsuperior, deleteoldrdn)
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' \
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost ,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <!-- check that "uid=kvaughan, ou=People, ${DIRECTORY_BASE}" does <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=kvaughan, ou=People,%s' \
'dsFilter' : 'objectclass=*',
<!-- check that new entry "uid=kvaughan2, ou=People, ${DIRECTORY_BASE}" exists --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=kvaughan2, ou=People,%s' \
'dsFilter' : 'objectclass=*'
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Rename Entry (preserving old #@TestID Rename Entry (preserving old rdn) #@TestPurpose Check that a rename (modrdn) operation is well propagated by replication. #@TestSteps Check old dn entry no longer exists #@TestSteps Check new dn entry exists and contains old rdn #@TestResult Success if rename worked and trees synchronised <
testcase name="getTestCaseName('Rename Entry (preserving old rdn)')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Rename Entry (preserving old rdn). \
Check that a rename (modrdn) operation is well propagated by \
dn = 'uid=jwallace, ou=People,%s' % synchroSuffix
write_replication_moddn_ldif_file(filePath, dn, newrdn,
newsuperior, deleteoldrdn)
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' \
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <!-- check that "uid=jwallace, ou=People, ${DIRECTORY_BASE}" does <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
'dsFilter' : 'objectclass=*',
<!-- check that new entry "uid=igueye, ou=People, ${DIRECTORY_BASE}" exists --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=igueye, ou=People,%s' % synchroSuffix,
'dsFilter' : 'uid=jwallace'
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
<
call function="'checktestRC'">
{ 'returncode' : resultLength,
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker Replication Basic Tests #@TestName Replication: Basic: Rename Subtree #@TestPurpose Check that a subtree rename (moddn) operation is well propagated by replication. #@TestSteps Rename subtree #@TestSteps Check old subtree no longer exists #@TestSteps Check new subree exists #@TestResult Success if rename worked and trees synchronised <
testcase name="getTestCaseName('Rename Subtree')">
<
call function="'testCase_Preamble'"/>
'Replication: Basic: Rename Subtree. Check that a subtree \
rename (moddn) operation is well propagated by replication.'
dn = 'ou=People,%s' % synchroSuffix
newrdn = 'ou=Special People'
newsuperior = 'ou=Special Users,%s' % synchroSuffix
write_replication_moddn_ldif_file(filePath, dn, newrdn,
newsuperior, deleteoldrdn)
<!-- Copy the replication_mod ldif to client host --> 'Copy %s file from %s to %s' \
<
call function="'copyFile'">
'destfile' : '%s/%s' % (clientDataDir,filename),
<!-- Modify "master" server --> <
call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsFilename' : '%s/%s' % (clientDataDir, filename)
<!-- Check modify worked on "master" server --> <!-- check that "uid=gfarmer, ou=People, ${DIRECTORY_BASE}" does <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'uid=gfarmer, ou=People,%s' \
'dsFilter' : 'objectclass=*',
base = 'uid=gfarmer, ou=Special People, ou=Special Users,%s' \
<!-- check that new entry "uid=gfarmer, ou=Special People, ou=Special Users, ${DIRECTORY_BASE}" exists --> <
call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsInstanceHost' : masterHost,
'dsFilter' : 'objectclass=*'
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<
import machine="STAF_LOCAL_HOSTNAME" <
call function="'replication_cleanup'" />
<
call function="'testSuite_Postamble'"/>