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