eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant<?xml version="1.0" encoding="UTF-8" standalone="no"?>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! CDDL HEADER START
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! The contents of this file are subject to the terms of the
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! Common Development and Distribution License, Version 1.0 only
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! (the "License"). You may not use this file except in compliance
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! with the License.
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! See the License for the specific language governing permissions
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! and limitations under the License.
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! 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:
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! Portions Copyright [yyyy] [name of copyright owner]
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! CDDL HEADER END
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! Copyright 2013 ForgeRock AS
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!-- Definition of Test Cases -->
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!--- Test Cases : Basic : Replication Operations -->
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!--- Test Case information
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestMarker Basic: replication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestName Basic: replication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestID basic_replication_operations_000
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPurpose Preamble
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPreamble Common Setup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestStep Import sample data
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPostamble Common Cleanup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestResult Test is successful if the result code is 0
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <function name="basic_replication_operations_000" scope="local">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ldifTemplate = '%s/import_Entries_100k.template' % remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Stop DS running on port %s' % master.getPort()
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : masterPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsHost' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAdminPort' : master.getAdminPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBindDN' : master.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBindPwd' : master.getRootPwd() }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!-- Check if 'ldifFile' exists -->
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : masterHost ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'entry' : ldifFile ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'attribute' : 'TYPE'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: File %s does not exist, create it' % ldifFile
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Make an make-ldif template file'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'suffix' : synchroSuffix,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'numEntries' : numberOfEntries ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'additionalAttributes' : True ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'extraLine' : 'userpassword: password' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'templateFile' : ldifTemplate ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'templateLocation' : masterHost
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Make the ldif file'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : masterPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'templateFile' : ldifTemplate ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'ldifFile' : ldifFile
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: File %s exists, do nothing' % ldifFile
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Import the ldif file'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : masterHost ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : masterPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'ldifFile' : ldifFile ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'backEnd' : 'userRoot'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Start DS to run on port %s' % master.getPort()
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : masterPath }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Perform the total update'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : clientHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : clientPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'sourceInstanceHost' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'sourceInstanceAdminPort' : master.getAdminPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'replicationDnList' : [synchroSuffix]
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Verify the tree synchronization'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant [ clientHost, clientPath, master, consumerList, synchroSuffix ]
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </testcase>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </function>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!--- Test Case information
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestMarker Basic: replication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestName Basic: replication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestID basic_replication_operations_001
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPurpose Verify basic LDAP modify operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPreamble Common Setup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestStep Run LDAP modify operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPostamble Common Cleanup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestResult Test is successful if the result code is 0
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <function name="basic_replication_operations_001" scope="local">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Test Name = %s' % STAXCurrentTestcase
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'ModRate.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'dsPath' : masterPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : master.getPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : master.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : master.getRootPwd(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : '"uid=user.%s,ou=People,o=example"',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'extraParams' : '-g "rand(0,%s)" -g "randstr(40)" -c 10' % (numberOfEntries - 1),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'attribute' : 'description' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'formatString' : '"%s"',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'replication_modrate.res',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : masterHost ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'filename' : '%s/replication_modrate.res' % remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant errorFound=False
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant for line in f.readlines():
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant line = line.replace('\n','')
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant if re.search('^[0-9].*', line) is not None:
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant if line.split()[7] != '0.0':
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant errorFound=True
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Do search on the master.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : masterPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : master.getPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : master.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : master.getRootPwd(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : synchroSuffix,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Do search on the client.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : clientPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : clientHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : client.getPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : client.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : client.getRootPwd(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : synchroSuffix,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Verify the tree synchronization.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant [ clientHost, clientPath, master, consumerList, synchroSuffix ]
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <catch exception="'STAXException'" typevar="eType" var="eInfo">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant '%s: Test failed. eInfo(%s)' % (eType,eInfo)
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </testcase>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </function>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!--- Test Case information
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestMarker Basic: replication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestName Basic: replication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestID basic_replication_operations_002
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPurpose Verify basic LDAP authentication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPreamble Common Setup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestStep Run LDAP authentication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPostamble Common Cleanup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestResult Test is successful if the result code is 0
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <function name="basic_replication_operations_002" scope="local">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Test Name = %s' % STAXCurrentTestcase
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Addrate.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'dsPath' : masterPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : master.getPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : master.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : master.getRootPwd(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'templateFile' : addTemplate,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'extraParams' : '-g "inc(%s,%s)" -g "randstr(5)" -g "randstr(5)" -g "randstr(5)" -g "randstr(5)" -m 100000' \
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant % (numberOfEntries, 2 * numberOfEntries),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'replication_addrate.res',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : masterHost ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'filename' : '%s/replication_addrate.res' % remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant errorFound=False
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant for line in f.readlines():
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant line = line.replace('\n','')
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant if re.search('^[0-9].*', line) is not None:
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant if line.split()[7] != '0.0':
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant errorFound=True
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Do search on the master and check number of entries.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : masterPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : master.getPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : master.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : master.getRootPwd(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsCountEntries' : 'True' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : synchroSuffix,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'ldapsearch_add_master.out' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : STAF_REMOTE_HOSTNAME ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'filename' : '%s/ldapsearch_add_master.out' % remote.temp ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'testString': 'Total number of matching entries: 200002'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Do search on the client and check number of entries.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : clientPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : clientHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : client.getPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : client.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : client.getRootPwd(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsCountEntries' : 'True' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : synchroSuffix,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'ldapsearch_add_client.out' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : STAF_REMOTE_HOSTNAME ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'filename' : '%s/ldapsearch_add_client.out' % remote.temp ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'testString': 'Total number of matching entries: 200002'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Verify the tree synchronization.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant [ clientHost, clientPath, master, consumerList, synchroSuffix ]
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <catch exception="'STAXException'" typevar="eType" var="eInfo">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant '%s: Test failed. eInfo(%s)' % (eType,eInfo)
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </testcase>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </function>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!--- Test Case information
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestMarker Basic: replication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestName Basic: replication operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestID basic_replication_operations_003
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPurpose Verify basic LDAP search operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPreamble Common Setup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestStep Run LDAP search operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPostamble Common Cleanup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestResult Test is successful if the result code is 0
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <function name="basic_replication_operations_003" scope="local">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Test Name = %s' % STAXCurrentTestcase
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'DelRate.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'dsPath' : masterPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : master.getPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : master.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : master.getRootPwd(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : '"uid=user.%s,ou=People,o=example"',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'extraParams' : '-g "inc(0,%s)" -m 100000' % (numberOfEntries - 1),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'replication_delrate.res',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : masterHost ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'filename' : '%s/replication_delrate.res' % remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant errorFound=False
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant for line in f.readlines():
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant line = line.replace('\n','')
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant if re.search('^[0-9].*', line) is not None:
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant if line.split()[7] != '0.0':
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant errorFound=True
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Do search on the master and check number of entries.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : masterPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : masterHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : master.getPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : master.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : master.getRootPwd(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsCountEntries' : 'True' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : synchroSuffix,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'ldapsearch_del_master.out' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : STAF_REMOTE_HOSTNAME ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'filename' : '%s/ldapsearch_del_master.out' % remote.temp ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'testString': 'Total number of matching entries: 100002'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Do search on the client and check number of entries.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsPath' : clientPath,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : clientHost,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : client.getPort(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : client.getRootDn(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : client.getRootPwd(),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsCountEntries' : 'True' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : synchroSuffix,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'ldapsearch_del_client.out' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : STAF_REMOTE_HOSTNAME ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'filename' : '%s/ldapsearch_del_client.out' % remote.temp ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'testString': 'Total number of matching entries: 100002'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Verify the tree synchronization.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant [ clientHost, clientPath, master, consumerList, synchroSuffix ]
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <catch exception="'STAXException'" typevar="eType" var="eInfo">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant '%s: Test failed. eInfo(%s)' % (eType,eInfo)
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </testcase>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </function>