6858c16497a49284f9fcba5fa12093b121306ca6gary.williams<?xml version="1.0" encoding="UTF-8" standalone="no"?>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! CDDL HEADER START
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.
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! or http://forgerock.org/license/CDDLv1.0.html.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! See the License for the specific language governing permissions
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! and limitations under the License.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! When distributing Covered Code, include this CDDL HEADER in each
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! file and include the License file at legal-notices/CDDLv1_0.txt.
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! If applicable, add the following below this CDDL HEADER, with the
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! fields enclosed by brackets "[]" replaced with your own identifying
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! information:
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! Portions Copyright [yyyy] [name of copyright owner]
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! CDDL HEADER END
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ! Copyright 2011-2013 ForgeRock AS
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!-- Definition of Test Cases -->
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!--- Test Cases : Basic : Operations -->
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!--- Test Case information
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestMarker Basic: operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestName Basic: operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestID basic_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_operations_000" scope="local">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant ldifTemplate = '%s/import_Entries_100k.template' % remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : STAF_REMOTE_HOSTNAME,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsHost' : DIRECTORY_INSTANCE_HOST,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBindDN' : DIRECTORY_INSTANCE_DN,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <!-- Check if 'ldifFile' exists -->
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : STAF_REMOTE_HOSTNAME ,
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 'numEntries' : numberOfEntries ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'additionalAttributes' : True ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'extraLine' : 'userpassword: password' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'templateFile' : ldifTemplate ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'templateLocation' : STAF_REMOTE_HOSTNAME
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Make the ldif file'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : STAF_REMOTE_HOSTNAME ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'templateFile' : ldifTemplate ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'ldifFile' : ldifFile
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: File %s exists, do nothing' % ldifFile
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Import the ldif file'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : STAF_REMOTE_HOSTNAME ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'ldifFile' : ldifFile ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'backEnd' : 'userRoot'
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Preamble: Start DS to run on port %s' % DIRECTORY_INSTANCE_PORT
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : STAF_REMOTE_HOSTNAME }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </testcase>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </function>
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!--- Test Case information
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestMarker Basic: operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestName Basic: operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestID basic_operations_001
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPurpose Verify basic LDAP authentication operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPreamble Common Setup
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestStep Run LDAP authentication operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPostamble Common Cleanup
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestResult Test is successful if the result code is 0
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <function name="basic_operations_001" scope="local">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Test Name = %s' % STAXCurrentTestcase
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Authrate.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'dsInstanceHost' : server.host,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : server.port,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : '"uid=user.%s,ou=People,dc=com"',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : 'password',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'extraParams' : '-g "rand(0,%s)" -c 10' % (numberOfEntries - 1),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'authrate.res',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : STAF_REMOTE_HOSTNAME ,
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 server.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : server.host,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : server.port,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : server.dn,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : server.password,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : 'dc=com',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn'
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!--- Test Case information
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestMarker Basic: operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestName Basic: operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestID basic_operations_002
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPurpose Verify basic LDAP search operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPreamble Common Setup
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestStep Run LDAP search operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPostamble Common Cleanup
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestResult Test is successful if the result code is 0
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <function name="basic_operations_002" scope="local">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Test Name = %s' % STAXCurrentTestcase
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'stepMessage' : 'SearchRate.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'dsInstanceHost' : server.host,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : server.port,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : server.dn,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : server.password,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : '"uid=user.%s,ou=People,dc=com"',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'extraParams' : '-g "rand(0,%s)" -c 10 "objectclass=*"' % (numberOfEntries - 1),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'searchrate.res',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : STAF_REMOTE_HOSTNAME ,
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 server.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : server.host,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : server.port,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : server.dn,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : server.password,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : 'dc=com',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn'
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!--- Test Case information
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestMarker Basic: operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestName Basic: operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestID basic_operations_003
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPurpose Verify basic LDAP modify operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPreamble Common Setup
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestStep Run LDAP modify operations
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPostamble Common Cleanup
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestResult Test is successful if the result code is 0
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <function name="basic_operations_003" scope="local">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Test Name = %s' % STAXCurrentTestcase
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'ModRate.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'dsInstanceHost' : server.host,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : server.port,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : server.dn,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : server.password,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : '"uid=user.%s,ou=People,dc=com"',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'extraParams' : '-g "rand(0,%s)" -g "randstr(40)" -c 10' % (numberOfEntries - 1),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'attribute' : 'description' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'formatString' : '"%s"',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'modrate.res',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : STAF_REMOTE_HOSTNAME ,
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 server.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : server.host,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : server.port,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : server.dn,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : server.password,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : 'dc=com',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn'
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: operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestName Basic: operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestID basic_operations_004
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPurpose Verify basic LDAP modify operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPreamble Common Setup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestStep Run LDAP add/delete operations
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestPostamble Common Cleanup
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant #@TestResult Test is successful if the result code is 0
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <function name="basic_operations_004" scope="local">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant <testcase name="getTestCaseName('addrate-delrate')">
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'Test Name = %s' % STAXCurrentTestcase
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'AddRate.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'dsInstanceHost' : server.host,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : server.port,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : server.dn,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : server.password,
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' : 'addrate.res',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : STAF_REMOTE_HOSTNAME ,
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 </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'DelRate.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'dsInstanceHost' : server.host,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : server.port,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : server.dn,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : server.password,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : '"uid=user.%s,ou=People,dc=com"',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'extraParams' : '-g "inc(0,%s)" -m 100000' % (numberOfEntries - 1),
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'delrate.res',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'location' : STAF_REMOTE_HOSTNAME ,
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 </sequence>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant </parallel>
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant { 'stepMessage' : 'Do search on the server and check number of entries.' }
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceHost' : server.host,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePort' : server.port,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstanceDn' : server.dn,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsInstancePswd' : server.password,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsCountEntries' : 'True' ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsBaseDN' : 'dc=com',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsFilter' : 'objectclass=*',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'dsAttributes' : 'dn',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputFile' : 'ldapsearch_add_del.out',
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'outputPath' : remote.temp
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'location' : STAF_REMOTE_HOSTNAME ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'filename' : '%s/ldapsearch_add_del.out' % remote.temp ,
eef18571250bbe04cbeb42b8ff6d47753b14af7fcsovant 'testString': 'Total number of matching entries: 100002'
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)