encryption_tests.xml revision 8fc236b9a04ca8cf4a6ee748cc701210ce4910d6
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams<?xml version="1.0" encoding="UTF-8" standalone="no"?>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams<!--
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! CDDL HEADER START
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams !
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! The contents of this file are subject to the terms of the
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! Common Development and Distribution License, Version 1.0 only
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! (the "License"). You may not use this file except in compliance
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! with the License.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams !
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! You can obtain a copy of the license at
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! See the License for the specific language governing permissions
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! and limitations under the License.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams !
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! When distributing Covered Code, include this CDDL HEADER in each
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! file and include the License file at
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! add the following below this CDDL HEADER, with the fields enclosed
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! by brackets "[]" replaced with your own identifying information:
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! Portions Copyright [yyyy] [name of copyright owner]
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams !
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! CDDL HEADER END
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams !
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! Copyright 2007-2010 Sun Microsystems, Inc.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! Portions Copyright 2011-2012 ForgeRock AS.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! -->
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams<stax>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!--- Test Case information
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestMarker Replication Encryption Tests
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestName Replication: Encryption: Add entry
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestID Add entry
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPurpose Check entry add over secured replication
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPreamble
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestSteps
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPostamble
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestResult
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams -->
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <function name="replication_encryption_001" scope="local">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <testcase name="getTestCaseName('Add entry')">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <try>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <call function="'testCase_Preamble'"/>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <message>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Test Name = %s' % STAXCurrentTestcase
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </message>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <call function="'testStep'">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'stepMessage' : '%s Check entry add over secured replication.' % msg1 }
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </call>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <iterate var="server" in="_topologyServerList" indexvar="i">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <script>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams serverPath = '%s/%s' % (server.getDir(), OPENDSNAME)
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams userDn = 'uid=iabizen-%s, ou=People, %s' % (i,synchroSuffix)
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </script>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!-- Add entry to one of the other servers -->
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <script>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams listAttr = []
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams listAttr.append('objectclass:top')
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams listAttr.append('objectclass:organizationalperson')
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams listAttr.append('objectclass:inetorgperson')
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams listAttr.append('objectclass:person')
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams listAttr.append('givenname:Izen-%s' % i)
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams listAttr.append('sn:Abizen-%s' % i)
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams listAttr.append('cn:Izen-%s Abizen-%s' % (i, i))
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams listAttr.append('l:ICNC')
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </script>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <call function="'addAnEntry'">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'location' : server.getHostname(),
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'dsPath' : serverPath,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'dsInstanceHost' : server.getHostname(),
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'dsInstancePort' : server.getPort(),
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'dsInstanceDn' : server.getRootDn(),
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'dsInstancePswd' : server.getRootPwd(),
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'DNToAdd' : userDn,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'listAttributes' : listAttr
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams }
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </call>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </iterate>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!-- Verify the synchronization of the trees among the servers in
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams the topology -->
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <call function="'verifyTrees'">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams [ clientHost, clientPath, master, consumerList, synchroSuffix ]
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </call>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <message log="1" level="'fatal'">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </message>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </catch>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <finally>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <call function="'testCase_Postamble'"/>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </finally>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </try>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </testcase>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams </function>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!--- Test Case information
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestMarker Replication Encryption Tests
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestName Replication: Encryption: Add entry after restart
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestID Add entry after restart
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPurpose Check entry add over secured replication after
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams server restart
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPreamble
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestSteps Restart servers
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestSteps Add entry
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPostamble
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestResult Success if trees synchronised over the topology
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams -->
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <function name="replication_encryption_002" scope="local">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <testcase name="getTestCaseName('Add entry after restart')">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <try>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <sequence>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <call function="'testCase_Preamble'"/>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<call function="'testStep'">
{ 'stepMessage' : '%s Check entry add over secured replication after server restart.' % msg1 }
</call>
<!-- Stop the servers in the topology -->
<call function="'stopServers'">
[_splitServerList]
</call>
<!-- Start the servers in the topology -->
<call function="'startServers'">
[_splitServerList]
</call>
<iterate var="server" in="_topologyServerList" indexvar="i">
<sequence>
<script>
serverPath = '%s/%s' % (server.getDir(), OPENDSNAME)
userDn = 'uid=RESTART-iabizen-%s, ou=People, %s' % \
(i,synchroSuffix)
</script>
<!-- Add entry to one of the other servers -->
<script>
listAttr = []
listAttr.append('objectclass:top')
listAttr.append('objectclass:organizationalperson')
listAttr.append('objectclass:inetorgperson')
listAttr.append('objectclass:person')
listAttr.append('givenname:Izen-%s' % i)
listAttr.append('sn:Abizen-%s' % i)
listAttr.append('cn:Izen-%s Abizen-%s' % (i, i))
listAttr.append('l:ICNC')
</script>
<call function="'addAnEntry'">
{ 'location' : server.getHostname(),
'dsPath' : serverPath,
'dsInstanceHost' : server.getHostname(),
'dsInstancePort' : server.getPort(),
'dsInstanceDn' : server.getRootDn(),
'dsInstancePswd' : server.getRootPwd(),
'DNToAdd' : userDn,
'listAttributes' : listAttr
}
</call>
</sequence>
</iterate>
<!-- Verify the synchronization of the trees among the servers in
the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Replication Encryption Tests
#@TestName Replication: Encryption: Modify entry
#@TestID Modify entry
#@TestPurpose Check entry modify over secured replication
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="replication_encryption_003" scope="local">
<testcase name="getTestCaseName('Modify entry')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<call function="'testStep'">
{ 'stepMessage' : '%s Check entry modify secured replication.' % msg1 }
</call>
<iterate var="server" in="_topologyServerList" indexvar="i">
<sequence>
<script>
serverPath = '%s/%s' % (server.getDir(), OPENDSNAME)
userDn = 'uid=iabizen-%s, ou=People, %s' % (i,synchroSuffix)
</script>
<!-- Modify entry on one of the servers -->
<call function="'modifyAnAttribute'">
{ 'location' : server.getHostname(),
'dsPath' : serverPath,
'dsInstanceHost' : server.getHostname(),
'dsInstancePort' : server.getPort(),
'dsInstanceDn' : server.getRootDn(),
'dsInstancePswd' : server.getRootPwd(),
'DNToModify' : userDn,
'attributeName' : 'l',
'newAttributeValue' : 'GEC',
'changetype' : 'replace'
}
</call>
</sequence>
</iterate>
<!-- Verify the synchronization of the trees among the servers in
the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix, ]
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Replication Encryption Tests
#@TestName Replication: Encryption: Delete entry
#@TestID Delete entry
#@TestPurpose Check entry delete over secured replication
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="replication_encryption_004" scope="local">
<testcase name="getTestCaseName('Delete entry')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<call function="'testStep'">
{ 'stepMessage' : '%s Check delete entry secured replication.' % msg1 }
</call>
<iterate var="server" in="_topologyServerList" indexvar="i">
<sequence>
<script>
serverPath = '%s/%s' % (server.getDir(), OPENDSNAME)
userDn = 'uid=iabizen-%s, ou=People, %s' % (i,synchroSuffix)
</script>
<!-- Delete entry on one of the servers -->
<call function="'DeleteEntry'">
{ 'location' : server.getHostname(),
'dsPath' : serverPath,
'dsInstanceHost' : server.getHostname(),
'dsInstancePort' : server.getPort() ,
'dsInstanceDn' : server.getRootDn() ,
'dsInstancePswd' : server.getRootPwd() ,
'dsBaseDN' : userDn
}
</call>
</sequence>
</iterate>
<!-- Verify the synchronization of the trees among the servers in
the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Replication Encryption Tests
#@TestName Replication: Encryption: Modify Entry - add
binary attribute
#@TestID Modify Entry - add binary attribute
#@TestPurpose Check that an entry modify is well propagated
by secured replication.
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="replication_encryption_005" scope="local">
<testcase name="getTestCaseName('Modify Entry - add binary attribute')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<call function="'testStep'">
{ 'stepMessage' : '%s Check that an entry modify is well propagated by secured replication.' % msg1 }
</call>
<script>
filename = 'replication_mod_add_binary.ldif'
filePath = '%s/%s' % (local.temp,filename)
binaryFilePath = '%s/replication/photo1.uu' % source.data
dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
modif = 'add'
attrType = 'jpegPhoto'
write_replication_mod_binary_ldif_file(filePath, dn, modif,
attrType, binaryFilePath)
</script>
<!-- Copy the replication_mod ldif to client host -->
<message>
'Copy %s file from %s to %s' % (filename,local.temp,
client.getTmpDir())
</message>
<call function="'copyFile'">
{ 'srcfile' : filePath,
'destfile' : '%s/%s' % (client.getTmpDir(),filename),
'remotehost' : client.getHostname() }
</call>
<!-- Modify "master" server -->
<call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
}
</call>
<!-- Check modify worked on "master" server -->
<call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
% synchroSuffix,
'dsFilter' : 'jpegPhoto=*',
'expectedRC' : 0
}
</call>
<script>
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
</script>
<call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
'expected' : 1
}
</call>
<!-- Verify the synchronization of the trees among the servers in
the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Replication Encryption Tests
#@TestName Replication: Encryption: Modify Entry -
replace binary attribute
#@TestID Modify Entry - replace binary attribute
#@TestPurpose Check that an entry modify is well propagated
by secured replication.
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="replication_encryption_006" scope="local">
<testcase name="getTestCaseName('Modify Entry - replace binary attribute')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<call function="'testStep'">
{ 'stepMessage' : '%s Check that an entry modify is well propagated by secured replication.' % msg1 }
</call>
<script>
filename = 'replication_mod_replace_binary.ldif'
filePath = '%s/%s' % (local.temp,filename)
binaryFilePath = '%s/replication/photo2.uu' % source.data
dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
modif = 'replace'
attrType = 'jpegPhoto'
write_replication_mod_binary_ldif_file(filePath, dn, modif,
attrType,
binaryFilePath)
</script>
<!-- Copy the replication_mod ldif to client host -->
<message>
'Copy %s file from %s to %s' % (filename,local.temp,
client.getTmpDir())
</message>
<call function="'copyFile'">
{ 'srcfile' : filePath,
'destfile' : '%s/%s' % (client.getTmpDir(),filename),
'remotehost' : client.getHostname()
}
</call>
<!-- Modify "master" server -->
<call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
}
</call>
<!-- Check modify worked on "master" server -->
<call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
% synchroSuffix,
'dsFilter' : 'jpegPhoto=*',
'expectedRC' : 0
}
</call>
<script>
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
</script>
<call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
'expected' : 1
}
</call>
<!-- Verify the synchronization of the trees among the servers in
the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Replication Encryption Tests
#@TestName Replication: Encryption: Modify Entry -
delete binary attribute
#@TestID Modify Entry - delete binary attribute
#@TestPurpose Check that an entry modify is well propagated
by secured replication.
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="replication_encryption_007" scope="local">
<testcase name="getTestCaseName('Modify Entry - delete binary attribute')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<call function="'testStep'">
{ 'stepMessage' : '%s Check that an entry modify is well propagated by secured secured replication.' % msg1 }
</call>
<script>
filename = 'replication_mod_delete_binary.ldif'
filePath = '%s/%s' % (local.temp,filename)
dn = 'uid=hmiller, ou=People,%s' % synchroSuffix
modif = 'delete'
attrType = 'jpegPhoto'
attrValue = None
write_replication_mod_ldif_file(filePath, dn, modif, attrType,
attrValue)
</script>
<!-- Copy the replication_mod ldif to client host -->
<message>
'Copy %s file from %s to %s' % (filename,local.temp,
client.getTmpDir())
</message>
<call function="'copyFile'">
{ 'srcfile' : filePath,
'destfile' : '%s/%s' % (client.getTmpDir(),filename),
'remotehost' : client.getHostname() }
</call>
<!-- Modify "master" server -->
<call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
}
</call>
<!-- Check modify worked on "master" server -->
<call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsBaseDN' : 'uid=hmiller, ou=People,%s' \
% synchroSuffix,
'dsFilter' : 'jpegPhoto=*',
'expectedRC' : 0
}
</call>
<script>
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
</script>
<call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
'expected' : 0
}
</call>
<!-- Verify the synchronization of the trees among the servers in
the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix, ]
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Replication Encryption Tests
#@TestName Replication: Encryption: Rename Entry
#@TestID Rename Entry
#@TestPurpose Check that a rename (modrdn) operation is well
propagated by secured replication.
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="replication_encryption_008" scope="local">
<testcase name="getTestCaseName('Rename Entry')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<call function="'testStep'">
{ 'stepMessage' : '%sCheck that a rename entry (modrdn) operation is well propagated by secured replication.' % msg1 }
</call>
<script>
filename = 'replication_modrdn.ldif'
filePath = '%s/%s' % (local.temp,filename)
dn = 'uid=kvaughan, ou=People,%s' % synchroSuffix
newrdn = 'uid=kvaughan2'
newsuperior = None
deleteoldrdn = 1
write_replication_moddn_ldif_file(filePath, dn, newrdn,
newsuperior, deleteoldrdn)
</script>
<!-- Copy the replication_mod ldif to client host -->
<message>
'Copy %s file from %s to %s' % (filename,local.temp,
client.getTmpDir())
</message>
<call function="'copyFile'">
{ 'srcfile' : filePath,
'destfile' : '%s/%s' % (client.getTmpDir(),filename),
'remotehost' : client.getHostname()
}
</call>
<!-- Modify "master" server -->
<call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
}
</call>
<!-- Check modify worked on "master" server -->
<!-- check that "uid=kvaughan, ou=People, ${DIRECTORY_BASE}"
does NOT exist anymore -->
<call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsBaseDN' : 'uid=kvaughan, ou=People,%s' \
% synchroSuffix,
'dsFilter' : 'objectclass=*',
'expectedRC' : 32
}
</call>
<!-- check that new entry "uid=kvaughan2, ou=People,
${DIRECTORY_BASE}" exists -->
<call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsBaseDN' : 'uid=kvaughan2, ou=People,%s' \
% synchroSuffix,
'dsFilter' : 'objectclass=*'
}
</call>
<!-- Verify the synchronization of the trees among the servers in
the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Replication Encryption Tests
#@TestName Replication: Encryption: Rename Entry
(preserving old rdn)
#@TestID Rename Entry (preserving old rdn)
#@TestPurpose Check that a rename (modrdn) operation is well
propagated by secured replication.
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="replication_encryption_009" scope="local">
<testcase name="getTestCaseName('Rename Entry (preserving old rdn)')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<call function="'testStep'">
{ 'stepMessage' : '%s Check that a rename (modrdn) operation is well propagated by secured replication.' % msg1 }
</call>
<script>
filename = 'replication_modrdn_preserve.ldif'
filePath = '%s/%s' % (local.temp,filename)
dn = 'uid=jwallace, ou=People,%s' % synchroSuffix
newrdn = 'uid=igueye'
newsuperior = None
deleteoldrdn = 0
write_replication_moddn_ldif_file(filePath, dn, newrdn,
newsuperior, deleteoldrdn)
</script>
<!-- Copy the replication_mod ldif to client host -->
<message>
'Copy %s file from %s to %s' % (filename,local.temp,
client.getTmpDir())
</message>
<call function="'copyFile'">
{ 'srcfile' : filePath,
'destfile' : '%s/%s' % (client.getTmpDir(),filename),
'remotehost' : client.getHostname()
}
</call>
<!-- Modify "master" server -->
<call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
}
</call>
<!-- Check modify worked on "master" server -->
<!-- check that "uid=jwallace, ou=People, ${DIRECTORY_BASE}"
does NOT exist anymore -->
<call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsBaseDN' : 'uid=jwallace, ou=People,%s' \
% synchroSuffix,
'dsFilter' : 'objectclass=*',
'expectedRC' : 32
}
</call>
<!-- check that new entry "uid=igueye, ou=People,
${DIRECTORY_BASE}" exists -->
<call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsBaseDN' : 'uid=igueye, ou=People,%s' % synchroSuffix,
'dsFilter' : 'uid=jwallace'
}
</call>
<script>
searchRC = STAXResult[0][0]
searchResult = STAXResult[0][1]
resultLength = len(searchResult) > 0
</script>
<call function="'checktestRC'">
{ 'returncode' : resultLength ,
'result' : searchResult ,
'expected' : 1
}
</call>
<!-- Verify the synchronization of the trees among the servers in
the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker Replication Encryption Tests
#@TestName Replication: Encryption: Rename Subtree
#@TestID Rename Subtree
#@TestPurpose Check that a subtree rename (moddn) operation
is well propagated by secured replication.
#@TestPreamble
#@TestSteps
#@TestPostamble
#@TestResult
-->
<function name="replication_encryption_010" scope="local">
<testcase name="getTestCaseName('Rename Subtree')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Test Name = %s' % STAXCurrentTestcase
</message>
<call function="'testStep'">
{ 'stepMessage' : '%s Check that a subtree rename (moddn) operation is well propagated by secured replication.' % msg1 }
</call>
<script>
filename = 'replication_moddn.ldif'
filePath = '%s/%s' % (local.temp,filename)
dn = 'ou=People,%s' % synchroSuffix
newrdn = 'ou=Special People'
newsuperior = 'ou=Special Users,%s' % synchroSuffix
deleteoldrdn = 0
write_replication_moddn_ldif_file(filePath, dn, newrdn,
newsuperior, deleteoldrdn)
</script>
<!-- Copy the replication_mod ldif to client host -->
<message>
'Copy %s file from %s to %s' % (filename,local.temp,
client.getTmpDir())
</message>
<call function="'copyFile'">
{ 'srcfile' : filePath,
'destfile' : '%s/%s' % (client.getTmpDir(),filename),
'remotehost' : client.getHostname() }
</call>
<!-- Modify "master" server -->
<call function="'ldapModifyWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsFilename' : '%s/%s' % (client.getTmpDir(), filename)
}
</call>
<!-- Check modify worked on "master" server -->
<!-- check that "uid=gfarmer, ou=People, ${DIRECTORY_BASE}"
does NOT exist anymore -->
<call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsBaseDN' : 'uid=gfarmer, ou=People,%s' \
% synchroSuffix,
'dsFilter' : 'objectclass=*',
'expectedRC' : 32
}
</call>
<!-- check that new entry "uid=gfarmer, ou=Special People,
ou=Special Users, ${DIRECTORY_BASE}" exists -->
<call function="'ldapSearchWithScript'">
{ 'location' : clientHost,
'dsPath' : clientPath,
'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort() ,
'dsInstanceDn' : master.getRootDn() ,
'dsInstancePswd' : master.getRootPwd() ,
'dsBaseDN' : 'uid=gfarmer, ou=Special People, \
ou=Special Users,%s' % synchroSuffix,
'dsFilter' : 'objectclass=*'
}
</call>
<!-- Verify the synchronization of the trees among the servers in
the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
</stax>