6350N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
6350N/A ! The contents of this file are subject to the terms of the 6350N/A ! Common Development and Distribution License, Version 1.0 only 6350N/A ! (the "License"). You may not use this file except in compliance 6350N/A ! See the License for the specific language governing permissions 6350N/A ! and limitations under the License. 6350N/A ! When distributing Covered Code, include this CDDL HEADER in each 6982N/A ! If applicable, add the following below this CDDL HEADER, with the 6982N/A ! fields enclosed by brackets "[]" replaced with your own identifying 6350N/A ! Portions Copyright [yyyy] [name of copyright owner] 6350N/A ! Copyright 2013 ForgeRock AS 6350N/A <!-- Definition of Test Cases --> 6350N/A <!--- Test Cases : Basic : Replication Operations --> 6350N/A <!--- Test Case information 6350N/A #@TestMarker Basic: replication operations 6350N/A #@TestName Basic: replication operations 6350N/A #@TestID basic_replication_operations_000 6350N/A #@TestPreamble Common Setup 6350N/A #@TestStep Import sample data 6350N/A #@TestPostamble Common Cleanup 6350N/A #@TestResult Test is successful if the result code is 0 6350N/A <
function name="basic_replication_operations_000" scope="local">
6350N/A <
testcase name="getTestCaseName('Preamble')">
6350N/A <
call function="'testCase_Preamble'"/>
6350N/A <
call function="'StopDsWithScript'">
6350N/A <!-- Check if 'ldifFile' exists --> 6350N/A <
call function="'GetEntry'">
6350N/A 'Preamble: File %s does not exist, create it' % ldifFile
6350N/A 'Preamble: Make an make-ldif template file'
6350N/A <
call function="'MakeAMakeLdifTemplate'">
6350N/A 'numEntries' : numberOfEntries ,
6350N/A 'additionalAttributes' : True ,
6350N/A 'extraLine' : 'userpassword: password' ,
6350N/A 'templateFile' : ldifTemplate ,
6350N/A 'templateLocation' : masterHost
6350N/A 'Preamble: Make the ldif file'
6350N/A <
call function="'MakeLdifWithScript'">
6350N/A 'templateFile' : ldifTemplate ,
6350N/A 'Preamble: File %s exists, do nothing' % ldifFile
6350N/A 'Preamble: Import the ldif file'
6350N/A <
call function="'ImportLdifWithScript'">
6350N/A <
call function="'StartDsWithScript'">
6350N/A 'Preamble: Perform the total update'
6350N/A <
call function="'initializeReplication'">
6350N/A 'sourceInstanceHost' : masterHost,
6350N/A 'replicationDnList' : [synchroSuffix]
6350N/A 'Preamble: Verify the tree synchronization'
6350N/A <
call function="'verifyTreesSdk'">
6350N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
6350N/A <
call function="'testCase_Postamble'"/>
6350N/A <!--- Test Case information 6350N/A #@TestMarker Basic: replication operations 6350N/A #@TestName Basic: replication operations 6350N/A #@TestID basic_replication_operations_001 6350N/A #@TestPurpose Verify basic LDAP modify operations 6350N/A #@TestPreamble Common Setup 6350N/A #@TestStep Run LDAP modify operations 6350N/A #@TestPostamble Common Cleanup 6350N/A #@TestResult Test is successful if the result code is 0 6350N/A <
function name="basic_replication_operations_001" scope="local">
6350N/A <
testcase name="getTestCaseName('modrate')">
6350N/A <
call function="'testCase_Preamble'"/>
6350N/A 'Test Name = %s' % STAXCurrentTestcase
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'ModRate.' }
6350N/A <
timer duration="timerDuration">
6350N/A <
call function="'modRate'">
6350N/A 'dsInstanceHost' : masterHost,
6350N/A 'dsBaseDN' : '"uid=user.%s,ou=People,o=example"',
6350N/A 'extraParams' : '-g "rand(0,%s)" -g "randstr(40)" -c 10' % (numberOfEntries - 1),
6350N/A 'attribute' : 'description' ,
6350N/A <
call function="'getFile'">
6350N/A { 'location' : masterHost ,
6350N/A <
if expr="errorFound == False">
6350N/A <
tcstatus result="'pass'"/>
6350N/A <
message>'Error found during modrate'</
message>
6350N/A <
tcstatus result="'fail'"/>
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Do search on the master.' }
6350N/A <
call function="'ldapSearchWithScript'">
6350N/A 'dsInstanceHost' : masterHost,
6350N/A 'dsBaseDN' : synchroSuffix,
6350N/A 'dsFilter' : 'objectclass=*',
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Do search on the client.' }
6350N/A <
call function="'ldapSearchWithScript'">
6350N/A 'dsInstanceHost' : clientHost,
6350N/A 'dsBaseDN' : synchroSuffix,
6350N/A 'dsFilter' : 'objectclass=*',
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Verify the tree synchronization.' }
6350N/A <
call function="'verifyTreesSdk'">
6350N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
6350N/A <
catch exception="'STAXException'" typevar="eType" var="eInfo">
6350N/A <
message log="1" level="'fatal'">
6350N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
6350N/A <
call function="'testCase_Postamble'"/>
6350N/A <!--- Test Case information 6350N/A #@TestMarker Basic: replication operations 6350N/A #@TestName Basic: replication operations 6350N/A #@TestID basic_replication_operations_002 6350N/A #@TestPurpose Verify basic LDAP authentication operations 6350N/A #@TestPreamble Common Setup 6350N/A #@TestStep Run LDAP authentication operations 6350N/A #@TestPostamble Common Cleanup 6350N/A #@TestResult Test is successful if the result code is 0 6350N/A <
function name="basic_replication_operations_002" scope="local">
6350N/A <
testcase name="getTestCaseName('addrate')">
6350N/A <
call function="'testCase_Preamble'"/>
6350N/A 'Test Name = %s' % STAXCurrentTestcase
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Addrate.' }
6350N/A <
timer duration="timerDuration">
6350N/A <
call function="'addRate'">
6350N/A 'dsInstanceHost' : masterHost,
6350N/A 'templateFile' : addTemplate,
6350N/A 'extraParams' : '-g "inc(%s,%s)" -g "randstr(5)" -g "randstr(5)" -g "randstr(5)" -g "randstr(5)" -m 100000' \
6350N/A % (numberOfEntries, 2 * numberOfEntries),
6350N/A <
call function="'getFile'">
6350N/A { 'location' : masterHost ,
6350N/A <
if expr="errorFound == False">
6350N/A <
tcstatus result="'pass'"/>
6350N/A <
message>'Error found during addrate'</
message>
6350N/A <
tcstatus result="'fail'"/>
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Do search on the master and check number of entries.' }
6350N/A <
call function="'ldapSearchWithScript'">
6350N/A 'dsInstanceHost' : masterHost,
6350N/A 'dsCountEntries' : 'True' ,
6350N/A 'dsBaseDN' : synchroSuffix,
6350N/A 'dsFilter' : 'objectclass=*',
6350N/A 'location' : STAF_REMOTE_HOSTNAME ,
6350N/A 'testString': 'Total number of matching entries: 200002'
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Do search on the client and check number of entries.' }
6350N/A <
call function="'ldapSearchWithScript'">
6350N/A 'dsInstanceHost' : clientHost,
6350N/A 'dsCountEntries' : 'True' ,
6350N/A 'dsBaseDN' : synchroSuffix,
6350N/A 'dsFilter' : 'objectclass=*',
6350N/A 'location' : STAF_REMOTE_HOSTNAME ,
6350N/A 'testString': 'Total number of matching entries: 200002'
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Verify the tree synchronization.' }
6350N/A <
call function="'verifyTreesSdk'">
6350N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
6350N/A <
catch exception="'STAXException'" typevar="eType" var="eInfo">
6350N/A <
message log="1" level="'fatal'">
6350N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
6350N/A <
call function="'testCase_Postamble'"/>
6350N/A <!--- Test Case information 6350N/A #@TestMarker Basic: replication operations 6350N/A #@TestName Basic: replication operations 6350N/A #@TestID basic_replication_operations_003 6350N/A #@TestPurpose Verify basic LDAP search operations 6350N/A #@TestPreamble Common Setup 6350N/A #@TestStep Run LDAP search operations 6350N/A #@TestPostamble Common Cleanup 6350N/A #@TestResult Test is successful if the result code is 0 6350N/A <
function name="basic_replication_operations_003" scope="local">
6350N/A <
testcase name="getTestCaseName('delrate')">
6350N/A <
call function="'testCase_Preamble'"/>
6350N/A 'Test Name = %s' % STAXCurrentTestcase
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'DelRate.' }
6350N/A <
timer duration="timerDuration">
6350N/A <
call function="'delRate'">
6350N/A 'dsInstanceHost' : masterHost,
6350N/A 'dsBaseDN' : '"uid=user.%s,ou=People,o=example"',
6350N/A 'extraParams' : '-g "inc(0,%s)" -m 100000' % (numberOfEntries - 1),
6350N/A <
call function="'getFile'">
6350N/A { 'location' : masterHost ,
6350N/A <
if expr="errorFound == False">
6350N/A <
tcstatus result="'pass'"/>
6350N/A <
message>'Error found during delrate'</
message>
6350N/A <
tcstatus result="'fail'"/>
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Do search on the master and check number of entries.' }
6350N/A <
call function="'ldapSearchWithScript'">
6350N/A 'dsInstanceHost' : masterHost,
6350N/A 'dsCountEntries' : 'True' ,
6350N/A 'dsBaseDN' : synchroSuffix,
6350N/A 'dsFilter' : 'objectclass=*',
6350N/A 'location' : STAF_REMOTE_HOSTNAME ,
6350N/A 'testString': 'Total number of matching entries: 100002'
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Do search on the client and check number of entries.' }
6350N/A <
call function="'ldapSearchWithScript'">
6350N/A 'dsInstanceHost' : clientHost,
6350N/A 'dsCountEntries' : 'True' ,
6350N/A 'dsBaseDN' : synchroSuffix,
6350N/A 'dsFilter' : 'objectclass=*',
6350N/A 'location' : STAF_REMOTE_HOSTNAME ,
6350N/A 'testString': 'Total number of matching entries: 100002'
6350N/A <
call function="'testStep'">
6350N/A { 'stepMessage' : 'Verify the tree synchronization.' }
6350N/A <
call function="'verifyTreesSdk'">
6350N/A [ clientHost, clientPath, master, consumerList, synchroSuffix ]
6350N/A <
catch exception="'STAXException'" typevar="eType" var="eInfo">
6350N/A <
message log="1" level="'fatal'">
6350N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
6350N/A <
call function="'testCase_Postamble'"/>