<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
! The contents of this file are subject to the terms of the ! Common Development and Distribution License, Version 1.0 only ! (the "License"). You may not use this file except in compliance ! You can obtain a copy of the license at ! See the License for the specific language governing permissions ! and limitations under the License. ! When distributing Covered Code, include this CDDL HEADER in each ! file and include the License file at ! add the following below this CDDL HEADER, with the fields enclosed ! by brackets "[]" replaced with your own identifying information: ! Portions Copyright [yyyy] [name of copyright owner] ! Copyright 2012 ForgeRock AS. <!-- Definition of Test Cases --> <!--- Test Cases : ImportLDIF: Tasks --> <!--- Test Case information #@TestMarker ImportLDIF: Tasks #@TestName ImportLDIF: Tasks #@TestID importldif_tasks_001 #@TestPurpose Verify import LDIF with Tasks #@TestPreamble Common Setup #@TestStep Make template for makeldif. #@TestStep Create ldif file for import using makeldif. #@TestStep Import the LDIF file. #@TestStep Start the Directory Server. #@TestStep Verify import LDIF operations. #@TestPostamble Common Cleanup #@TestResult Test is successful if the result code is 0 <
function name="importldif_tasks_001" scope="local">
<
testcase name="getTestCaseName('Tasks')">
<
call function="'testCase_Preamble'"/>
totalEntries = numberOfEntries + 2
'Import Ldif Tasks: Binary Attribute: Looking for file, %s. File exists? (0=false, 1=true) %s' % (curr_filename, curr_file_exists)
<
if expr="curr_file_exists=='0'">
'Import Ldif Tasks: Binary Attribute: Preamble - Make an make-ldif template file'
<
call function="'MakeAMakeLdifTemplate'">
{ 'numEntries' : numberOfEntries ,
'extraLine' : 'jpegPhoto:: <random:base64:38000>'}
'Import Ldif Tasks: Binary Attribute: Preamble - Make the ldif file'
<
call function="'MakeLdifWithScript'">
'ldifFile' : curr_filename }
'Import Ldif Tasks: Binary Attribute: Import large ldif file'
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'ldifFile' : curr_filename ,
'numLdapCheckTries' : 1000,
'sleepBetweenLdapCheckTries' : 300000
<
call function="'checktestRC'">
<
call function="'setKnownIssue'">
'Import Ldif Tasks: Binary Attribute: Search for certain entries that were imported'
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
'uid=user.10000,ou=People,dc=com' ,
'uid=user.20000,ou=People,dc=com' ,
'uid=user.30000,ou=People,dc=com' ,
'uid=user.40000,ou=People,dc=com' ,
'uid=user.50000,ou=People,dc=com' ,
'uid=user.60000,ou=People,dc=com' ,
'uid=user.70000,ou=People,dc=com' ,
'uid=user.80000,ou=People,dc=com' ,
'uid=user.90000,ou=People,dc=com' ,
'uid=user.99999,ou=People,dc=com'] ,
<
catch exception="'STAXException'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>
<!--- Test Case information #@TestMarker ImportLDIF: Tasks #@TestName ImportLDIF: Tasks #@TestID importldif_tasks_001 #@TestPurpose Verify import LDIF with Tasks #@TestPreamble Common Setup #@TestStep Make template for makeldif. #@TestStep Create ldif file for import using makeldif. #@TestStep Import the LDIF file. #@TestStep Start the Directory Server. #@TestStep Verify import LDIF operations. #@TestPostamble Common Cleanup #@TestResult Test is successful if the result code is 0 <
function name="importldif_tasks_002" scope="local">
<
testcase name="getTestCaseName('Tasks Load')">
<
call function="'testCase_Preamble'"/>
'Import Ldif Tasks: Binary Attribute With Load: Preamble - Make an make-ldif template file'
<
call function="'MakeAMakeLdifTemplate'">
{ 'numEntries' : numberOfEntries ,
'Import Ldif Tasks: Binary Attribute With Load: Preamble - Make the ldif file'
<
call function="'MakeLdifWithScript'">
'Import Ldif Tasks: Binary Attribute With Load: Import large ldif file'
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
<
call function="'checktestRC'">
'Import Ldif Tasks: Binary Attribute: Looking for file, %s. File exists? (0=false, 1=true) %s' % (curr_filename, curr_file_exists)
<
if expr="curr_file_exists=='0'">
'Import Ldif Tasks: Binary Attribute: Preamble - Make an make-ldif template file'
<
call function="'MakeAMakeLdifTemplate'">
{ 'numEntries' : numberOfEntries ,
'extraLine' : 'jpegPhoto:: <random:base64:38000>'}
'Import Ldif Tasks: Binary Attribute: Preamble - Make the ldif file'
<
call function="'MakeLdifWithScript'">
'ldifFile' : curr_filename }
clientList = ['dummyClient1', 'dummyClient2', 'dummyClient3', 'dummyClient4',
'dummyClient5', 'dummyClient6', 'dummyClient7', 'dummyClient8',
'dummyClient9', 'dummyClient10', 'dummyClient11', 'dummyClient12',
'dummyClient13', 'dummyClient14', 'dummyClient15', 'dummyClient16']
'Import Ldif Tasks: Binary Attribute With Load: Import Large Ldif File - Sleep 2 s to ensure modify load starts'
<
call function="'Sleep'">
{ 'sleepForMilliSeconds' : 2000 }
'Import Ldif Tasks: Binary Attribute With Load: Import Large Ldif File - Add import task'
<
call function="'ImportLdifWithScript'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
'ldifFile' : curr_filename ,
'numLdapCheckTries' : 1000,
'sleepBetweenLdapCheckTries' : 300000
<
call function="'checktestRC'">
<
iterate var="mlClient" in="clientList" indexvar="index">
<
paralleliterate var="client" in="clientList">
<
block name="'ModifyLoad_%s' % client">
<
call function="'loadOfModifies'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'partialDNToModify' : 'ou=People,dc=com' ,
'attributeName' : 'description' ,
'newAttributeValue' : 'Modify load forever' ,
'changetype' : 'replace',
<
if expr="STAXCode == 32" >
'Import Ldif Tasks: Binary Attribute With Load: Search for certain entries that were imported'
<
call function="'checkImport'">
{ 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
'uid=user.10000,ou=People,dc=com' ,
'uid=user.20000,ou=People,dc=com' ,
'uid=user.30000,ou=People,dc=com' ,
'uid=user.40000,ou=People,dc=com' ,
'uid=user.50000,ou=People,dc=com' ,
'uid=user.60000,ou=People,dc=com' ,
'uid=user.70000,ou=People,dc=com' ,
'uid=user.80000,ou=People,dc=com' ,
'uid=user.90000,ou=People,dc=com' ,
'uid=user.99999,ou=People,dc=com'] ,
<
catch exception="'STAXException'" typevar="eType" var="eInfo">
<
message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
<
call function="'testCase_Postamble'"/>