importldif_binary_attributes_tests.xml revision 6982
446N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4744N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
446N/A<!--
446N/A ! CDDL HEADER START
446N/A !
446N/A ! The contents of this file are subject to the terms of the
446N/A ! Common Development and Distribution License, Version 1.0 only
446N/A ! (the "License"). You may not use this file except in compliance
446N/A ! with the License.
446N/A !
446N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
446N/A ! or http://forgerock.org/license/CDDLv1.0.html.
446N/A ! See the License for the specific language governing permissions
446N/A ! and limitations under the License.
446N/A !
446N/A ! When distributing Covered Code, include this CDDL HEADER in each
446N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
446N/A ! If applicable, add the following below this CDDL HEADER, with the
446N/A ! fields enclosed by brackets "[]" replaced with your own identifying
446N/A ! information:
873N/A ! Portions Copyright [yyyy] [name of copyright owner]
446N/A !
446N/A ! CDDL HEADER END
446N/A !
446N/A ! Copyright 2012 ForgeRock AS.
5073N/A ! -->
446N/A<stax>
446N/A
446N/A <!-- Definition of Test Cases -->
4744N/A
4744N/A <!--- Test Cases : ImportLDIF: Binary Attributes -->
4744N/A
4744N/A <!--- Test Case information
4744N/A #@TestMarker ImportLDIF: Binary Attributes
4744N/A #@TestName ImportLDIF: Binary Attributes
4744N/A #@TestID importldif_binary_attributes_001
4744N/A #@TestPurpose Verify basic 100k import LDIF operations
4744N/A #@TestPreamble Common Setup
4744N/A #@TestStep Make template for makeldif.
4744N/A #@TestStep Create ldif file for import using makeldif.
4744N/A #@TestStep Import the LDIF file.
4744N/A #@TestStep Start the Directory Server.
4744N/A #@TestStep Verify import LDIF operations.
4744N/A #@TestStep Delete the ldif file.
4744N/A #@TestStep Delete the template file.
4744N/A #@TestPostamble Common Cleanup
4744N/A #@TestResult Test is successful if the result code is 0
4744N/A -->
4744N/A <function name="importldif_binary_attributes_001" scope="local">
4744N/A <testcase name="getTestCaseName('Binary Attributes 100k')">
4744N/A <sequence>
5073N/A <try>
4744N/A <sequence>
5073N/A
4744N/A <call function="'testCase_Preamble'"/>
4744N/A <message>
4744N/A 'Test Name = %s' % STAXCurrentTestcase
4744N/A </message>
4744N/A
957N/A <script>
4744N/A timerDuration = '620m'
4744N/A numberOfEntries = 100000
4744N/A totalEntries = numberOfEntries + 2
4744N/A
4744N/A ldifTemplate = '%s/%s_entries.template' % (remote.temp, numberOfEntries)
4744N/A ldifFile = '%s/%s_entries.ldif' % (remote.temp, numberOfEntries)
4744N/A </script>
4744N/A
4744N/A <!-- StopDS -->
4744N/A <call function="'StopDsWithScript'">
4744N/A { 'location' : STAF_REMOTE_HOSTNAME }
4744N/A </call>
4744N/A
4744N/A <!-- Check if 'ldifFile' exists -->
4744N/A <call function="'GetEntry'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'entry' : ldifFile ,
4744N/A 'attribute' : 'TYPE'
4744N/A }
4744N/A </call>
4744N/A <if expr="RC == 48">
4744N/A <sequence>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Make template for makeldif.' }
4744N/A </call>
4744N/A
4744N/A <call function="'MakeAMakeLdifTemplate'">
4744N/A {
4744N/A 'numEntries' : numberOfEntries ,
4744N/A 'additionalAttributes' : True ,
4744N/A 'templateFile' : ldifTemplate ,
4744N/A 'templateLocation' : STAF_REMOTE_HOSTNAME
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Create ldif file for import using makeldif.' }
4744N/A </call>
4744N/A
4744N/A <call function="'MakeLdifWithScript'">
4618N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'templateFile' : ldifTemplate ,
4744N/A 'ldifFile' : ldifFile
4744N/A }
4744N/A </call>
4744N/A </sequence>
4744N/A <else>
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Template and ldif file already created.' }
4744N/A </call>
4744N/A </else>
4744N/A </if>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Import the LDIF file.' }
4744N/A </call>
4744N/A
4744N/A <call function="'ImportLdifWithScript'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
5073N/A 'ldifFile' : ldifFile ,
4744N/A 'backEnd' : 'userRoot'
5073N/A }
4744N/A </call>
4744N/A
4744N/A <script>
4744N/A returnString = STAXResult[0][1]
4744N/A msg = 'Processed %s entries, imported %s, skipped 0, rejected 0' \
4744N/A % (totalEntries,totalEntries)
4744N/A </script>
4744N/A
4744N/A <call function="'checktestString'">
4744N/A {
4744N/A 'returnString' : returnString ,
4744N/A 'expectedString' : msg
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Start the Directory Server.' }
4744N/A </call>
4744N/A
4744N/A <call function="'StartDsWithScript'">
4744N/A { 'location' : STAF_REMOTE_HOSTNAME }
4744N/A </call>
4744N/A
4744N/A <script>
4744N/A returnString = STAXResult[0][1]
4744N/A msg = 'The database backend userRoot containing %s entries has started' \
4744N/A % totalEntries
4744N/A </script>
4744N/A
4744N/A <call function="'checktestString'">
4744N/A {
4744N/A 'returnString' : returnString ,
4744N/A 'expectedString' : msg
4744N/A }
4744N/A </call>
4744N/A
4744N/A <!--- Check that DS started -->
4744N/A <call function="'isAlive'">
4744N/A {
4744N/A 'noOfLoops' : 10 ,
4744N/A 'noOfMilliSeconds' : 5000
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Verify import LDIF operations.' }
4744N/A </call>
4744N/A
4744N/A <call function="'checkImport'">
4744N/A {
4744N/A 'expectedEntries' : ['uid=user.0,ou=People,dc=com' ,
4744N/A 'uid=user.10000,ou=People,dc=com' ,
4744N/A 'uid=user.20000,ou=People,dc=com' ,
4744N/A 'uid=user.30000,ou=People,dc=com' ,
5073N/A 'uid=user.40000,ou=People,dc=com' ,
4744N/A 'uid=user.50000,ou=People,dc=com' ,
5073N/A 'uid=user.60000,ou=People,dc=com' ,
4744N/A 'uid=user.70000,ou=People,dc=com' ,
4744N/A 'uid=user.80000,ou=People,dc=com' ,
4744N/A 'uid=user.90000,ou=People,dc=com' ,
4744N/A 'uid=user.99999,ou=People,dc=com'] ,
4744N/A 'startDS' : 'no'
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Delete the ldif file.' }
4744N/A </call>
4744N/A
4744N/A <call function="'deleteFile'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME,
4744N/A 'filename' : ldifFile
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Delete the template file.' }
4744N/A </call>
4744N/A
4744N/A <call function="'deleteFile'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME,
4744N/A 'filename' : ldifTemplate
4744N/A }
4744N/A </call>
4744N/A
4744N/A </sequence>
4744N/A
4618N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
4744N/A <message log="1" level="'fatal'">
4744N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
4744N/A </message>
4744N/A </catch>
4744N/A <finally>
4744N/A <sequence>
4744N/A <call function="'testCase_Postamble'"/>
4744N/A </sequence>
4744N/A </finally>
4744N/A </try>
4744N/A </sequence>
4744N/A </testcase>
4744N/A </function>
4744N/A
4744N/A <!--- Test Case information
4744N/A #@TestMarker ImportLDIF: Binary Attributes
4744N/A #@TestName ImportLDIF: Binary Attributes
4744N/A #@TestID importldif_binary_attributes_002
4744N/A #@TestPurpose Verify basic 6m import LDIF operations
4744N/A #@TestPreamble Common Setup
4744N/A #@TestStep Make template for makeldif.
5073N/A #@TestStep Create ldif file for import using makeldif.
4744N/A #@TestStep Import the LDIF file.
5073N/A #@TestStep Start the Directory Server.
4744N/A #@TestStep Verify import LDIF operations.
4744N/A #@TestStep Delete the ldif file.
4744N/A #@TestStep Delete the template file.
4744N/A #@TestPostamble Common Cleanup
4744N/A #@TestResult Test is successful if the result code is 0
4744N/A -->
4744N/A <function name="importldif_binary_attributes_002" scope="local">
4744N/A <testcase name="getTestCaseName('Binary Attributes 6m')">
4744N/A <sequence>
4744N/A <try>
4744N/A <sequence>
4744N/A
4744N/A <call function="'testCase_Preamble'"/>
4744N/A <message>
4744N/A 'Test Name = %s' % STAXCurrentTestcase
4744N/A </message>
4744N/A
4744N/A <script>
4744N/A timerDuration = '620m'
4744N/A numberOfEntries = 6000000
4744N/A totalEntries = numberOfEntries + 2
4744N/A
4744N/A ldifTemplate = '%s/%s_entries.template' % (remote.temp, numberOfEntries)
4744N/A ldifFile = '%s/%s_entries.ldif' % (remote.temp, numberOfEntries)
4744N/A </script>
4744N/A
4744N/A <!-- StopDS -->
4744N/A <call function="'StopDsWithScript'">
4744N/A { 'location' : STAF_REMOTE_HOSTNAME }
4744N/A </call>
4744N/A
4744N/A <message>
4618N/A 'Update java.properties file %s/%s/config/java.properties' \
4744N/A % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
4744N/A </message>
4744N/A
4744N/A <call function="'copyFile'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'srcfile' : '%s/%s/config/java.properties' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME) ,
4744N/A 'destfile' : '%s/java.properties' % local.temp ,
4744N/A 'remotehost' : STAXServiceMachine
4744N/A }
4744N/A </call>
4744N/A <script>
4744N/A rc = java_properties('%s/java.properties' % local.temp,
4744N/A 'import-ldif.offline',
4744N/A [ "-server", "-Xms2048m", "-Xmx3072m" ])
4744N/A </script>
4744N/A <message>'RC %s' % rc</message>
4744N/A <call function="'copyFile'">
4744N/A {
4744N/A 'location' : STAXServiceMachine ,
4744N/A 'srcfile' : '%s/java.properties' % local.temp ,
5073N/A 'destfile' : '%s/%s/config/java.properties' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME) ,
4744N/A 'remotehost' : STAF_REMOTE_HOSTNAME
5073N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'dsJavaPropertiesWithScript'">
4744N/A { 'location' : STAF_REMOTE_HOSTNAME }
4744N/A </call>
4744N/A
4744N/A <!-- Check if 'ldifFile' exists -->
4744N/A <call function="'GetEntry'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'entry' : ldifFile ,
4744N/A 'attribute' : 'TYPE'
4744N/A }
4744N/A </call>
4744N/A <if expr="RC == 48">
4744N/A <sequence>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Make template for makeldif.' }
4744N/A </call>
4744N/A
4744N/A <call function="'MakeAMakeLdifTemplate'">
4744N/A {
4744N/A 'numEntries' : numberOfEntries ,
4744N/A 'additionalAttributes' : True ,
4744N/A 'templateFile' : ldifTemplate ,
4744N/A 'templateLocation' : STAF_REMOTE_HOSTNAME
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Create ldif file for import using makeldif.' }
4744N/A </call>
4744N/A
4744N/A <call function="'MakeLdifWithScript'">
4618N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'templateFile' : ldifTemplate ,
4744N/A 'ldifFile' : ldifFile
4744N/A }
4744N/A </call>
4744N/A </sequence>
4744N/A <else>
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Template and ldif file already created.' }
4744N/A </call>
4744N/A </else>
4744N/A </if>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Import the LDIF file.' }
4744N/A </call>
4744N/A
4744N/A <call function="'ImportLdifWithScript'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'ldifFile' : ldifFile ,
5073N/A 'backEnd' : 'userRoot'
4744N/A }
5073N/A </call>
4744N/A
4744N/A <script>
4744N/A returnString = STAXResult[0][1]
4744N/A msg = 'Processed %s entries, imported %s, skipped 0, rejected 0' \
4744N/A % (totalEntries,totalEntries)
4744N/A </script>
4744N/A
4744N/A <call function="'checktestString'">
4744N/A {
4744N/A 'returnString' : returnString ,
4744N/A 'expectedString' : msg
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Start the Directory Server.' }
4744N/A </call>
4744N/A
4744N/A <call function="'StartDsWithScript'">
4744N/A { 'location' : STAF_REMOTE_HOSTNAME }
4744N/A </call>
4744N/A
4744N/A <script>
4744N/A returnString = STAXResult[0][1]
4744N/A msg = 'The database backend userRoot containing %s entries has started' \
4744N/A % totalEntries
4744N/A </script>
4744N/A
4744N/A <call function="'checktestString'">
4744N/A {
4744N/A 'returnString' : returnString ,
4744N/A 'expectedString' : msg
4744N/A }
4744N/A </call>
4744N/A
4744N/A <!--- Check that DS started -->
4744N/A <call function="'isAlive'">
4618N/A {
4744N/A 'noOfLoops' : 10 ,
4744N/A 'noOfMilliSeconds' : 5000
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Verify import LDIF operations.' }
4744N/A </call>
4744N/A
4744N/A <call function="'checkImport'">
4744N/A {
4744N/A 'expectedEntries' : ['uid=user.0,ou=People,dc=com' ,
4744N/A 'uid=user.1000000,ou=People,dc=com' ,
4744N/A 'uid=user.1500000,ou=People,dc=com' ,
4744N/A 'uid=user.2000000,ou=People,dc=com' ,
4744N/A 'uid=user.2500000,ou=People,dc=com' ,
4744N/A 'uid=user.3000000,ou=People,dc=com' ,
4744N/A 'uid=user.3500000,ou=People,dc=com' ,
4744N/A 'uid=user.4000000,ou=People,dc=com' ,
4744N/A 'uid=user.4500000,ou=People,dc=com' ,
4744N/A 'uid=user.5000000,ou=People,dc=com' ,
5073N/A 'uid=user.5999999,ou=People,dc=com'] ,
4744N/A 'startDS' : 'no'
5073N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Delete the ldif file.' }
4744N/A </call>
4744N/A
4744N/A <call function="'deleteFile'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME,
4744N/A 'filename' : ldifFile
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Delete the template file.' }
4744N/A </call>
4744N/A
4744N/A <call function="'deleteFile'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME,
4744N/A 'filename' : ldifTemplate
4744N/A }
4744N/A </call>
4744N/A
4744N/A </sequence>
4744N/A
4744N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
4744N/A <message log="1" level="'fatal'">
4744N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
4744N/A </message>
4744N/A </catch>
4744N/A <finally>
4744N/A <sequence>
4744N/A <call function="'testCase_Postamble'"/>
4744N/A </sequence>
4618N/A </finally>
4744N/A </try>
4744N/A </sequence>
4744N/A </testcase>
4744N/A </function>
4744N/A
4744N/A <!--- Test Case information
4744N/A #@TestMarker ImportLDIF: Binary Attributes
4744N/A #@TestName ImportLDIF: Binary Attributes
4744N/A #@TestID importldif_binary_attributes_003
4744N/A #@TestPurpose Verify basic 10m import LDIF operations
4744N/A #@TestPreamble Common Setup
4744N/A #@TestStep Make template for makeldif.
4744N/A #@TestStep Create ldif file for import using makeldif.
4744N/A #@TestStep Import the LDIF file.
4744N/A #@TestStep Start the Directory Server.
4744N/A #@TestStep Verify import LDIF operations.
4744N/A #@TestStep Delete the ldif file.
4744N/A #@TestStep Delete the template file.
4744N/A #@TestPostamble Common Cleanup
4744N/A #@TestResult Test is successful if the result code is 0
4744N/A -->
5073N/A <function name="importldif_binary_attributes_003" scope="local">
4744N/A <testcase name="getTestCaseName('Binary Attributes 10m')">
5073N/A <sequence>
4744N/A <try>
4744N/A <sequence>
4744N/A
4744N/A <call function="'testCase_Preamble'"/>
4744N/A <message>
4744N/A 'Test Name = %s' % STAXCurrentTestcase
4744N/A </message>
4744N/A
4744N/A <script>
4744N/A timerDuration = '620m'
4744N/A numberOfEntries = 10000000
4744N/A totalEntries = numberOfEntries + 2
4744N/A
4744N/A ldifTemplate = '%s/%s_entries.template' % (remote.temp, numberOfEntries)
4744N/A ldifFile = '%s/%s_entries.ldif' % (remote.temp, numberOfEntries)
4744N/A </script>
4744N/A
4744N/A <message>
4744N/A 'Import Ldif: Binary Attribute: Create custom indexes'
4744N/A </message>
4744N/A
4744N/A <call function="'dsconfig'">
4744N/A {
4744N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4744N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4744N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4744N/A 'subcommand' : 'create-local-db-index' ,
4744N/A 'objectType' : 'backend-name' ,
4744N/A 'objectName' : DIRECTORY_INSTANCE_BE ,
4744N/A 'optionsString' : '--index-name st --set index-type:equality --set index-type:substring'
4744N/A }
4618N/A </call>
4744N/A
4744N/A <call function="'dsconfig'">
4744N/A {
4744N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4744N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4744N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4744N/A 'subcommand' : 'create-local-db-index' ,
4744N/A 'objectType' : 'backend-name' ,
4744N/A 'objectName' : DIRECTORY_INSTANCE_BE ,
4744N/A 'optionsString' : '--index-name l --set index-type:presence --set index-type:substring'
4744N/A }
4744N/A </call>
4744N/A
4744N/A <!-- StopDS -->
4744N/A <call function="'StopDsWithScript'">
4744N/A { 'location' : STAF_REMOTE_HOSTNAME }
4744N/A </call>
4744N/A
4744N/A <message>
4744N/A 'Update java.properties file %s/%s/config/java.properties' \
4744N/A % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
5073N/A </message>
4744N/A
5073N/A <call function="'copyFile'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'srcfile' : '%s/%s/config/java.properties' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME) ,
4744N/A 'destfile' : '%s/java.properties' % local.temp ,
4744N/A 'remotehost' : STAXServiceMachine
4744N/A }
4744N/A </call>
4744N/A <script>
4744N/A rc = java_properties('%s/java.properties' % local.temp,
4744N/A 'import-ldif.offline',
4744N/A [ "-server", "-Xms2048m", "-Xmx3072m" ])
4744N/A </script>
4744N/A <message>'RC %s' % rc</message>
4744N/A <call function="'copyFile'">
4744N/A {
4744N/A 'location' : STAXServiceMachine ,
4744N/A 'srcfile' : '%s/java.properties' % local.temp ,
4744N/A 'destfile' : '%s/%s/config/java.properties' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME) ,
4744N/A 'remotehost' : STAF_REMOTE_HOSTNAME
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'dsJavaPropertiesWithScript'">
4744N/A { 'location' : STAF_REMOTE_HOSTNAME }
4744N/A </call>
4744N/A
4744N/A <!-- Check if 'ldifFile' exists -->
4744N/A <call function="'GetEntry'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'entry' : ldifFile ,
4744N/A 'attribute' : 'TYPE'
4744N/A }
4744N/A </call>
4744N/A <if expr="RC == 48">
4744N/A <sequence>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Make template for makeldif.' }
4744N/A </call>
4744N/A
4744N/A <call function="'MakeAMakeLdifTemplate'">
4744N/A {
4744N/A 'numEntries' : numberOfEntries ,
4744N/A 'additionalAttributes' : True ,
4744N/A 'templateFile' : ldifTemplate ,
4744N/A 'templateLocation' : STAF_REMOTE_HOSTNAME
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Create ldif file for import using makeldif.' }
4744N/A </call>
4744N/A
5073N/A <call function="'MakeLdifWithScript'">
4744N/A {
5073N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'templateFile' : ldifTemplate ,
4744N/A 'ldifFile' : ldifFile
4744N/A }
4744N/A </call>
4744N/A </sequence>
4744N/A <else>
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Template and ldif file already created.' }
4744N/A </call>
4744N/A </else>
4744N/A </if>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Import the LDIF file.' }
4744N/A </call>
4744N/A
4744N/A <call function="'ImportLdifWithScript'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME ,
4744N/A 'ldifFile' : ldifFile ,
4744N/A 'backEnd' : 'userRoot'
4744N/A }
4744N/A </call>
4744N/A
4744N/A <script>
4744N/A returnString = STAXResult[0][1]
4744N/A msg = 'Processed %s entries, imported %s, skipped 0, rejected 0' \
4744N/A % (totalEntries,totalEntries)
4744N/A </script>
4744N/A
4744N/A <call function="'checktestString'">
4618N/A {
4744N/A 'returnString' : returnString ,
4744N/A 'expectedString' : msg
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Start the Directory Server.' }
4744N/A </call>
4744N/A
4744N/A <call function="'StartDsWithScript'">
4744N/A { 'location' : STAF_REMOTE_HOSTNAME }
4744N/A </call>
4744N/A
4744N/A <script>
4744N/A returnString = STAXResult[0][1]
4744N/A msg = 'The database backend userRoot containing %s entries has started' \
4744N/A % totalEntries
4744N/A </script>
4744N/A
4744N/A <call function="'checktestString'">
4744N/A {
5073N/A 'returnString' : returnString ,
4744N/A 'expectedString' : msg
5073N/A }
4744N/A </call>
4744N/A
4744N/A <!--- Check that DS started -->
4744N/A <call function="'isAlive'">
4744N/A {
4744N/A 'noOfLoops' : 10 ,
4744N/A 'noOfMilliSeconds' : 5000
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Verify import LDIF operations.' }
4744N/A </call>
4744N/A
4744N/A <call function="'checkImport'">
4744N/A {
4744N/A 'expectedEntries' : ['uid=user.0,ou=People,dc=com' ,
4744N/A 'uid=user.1000000,ou=People,dc=com' ,
4744N/A 'uid=user.1500000,ou=People,dc=com' ,
4744N/A 'uid=user.2000000,ou=People,dc=com' ,
4744N/A 'uid=user.2500000,ou=People,dc=com' ,
4744N/A 'uid=user.3000000,ou=People,dc=com' ,
4744N/A 'uid=user.3500000,ou=People,dc=com' ,
4744N/A 'uid=user.4000000,ou=People,dc=com' ,
4744N/A 'uid=user.4500000,ou=People,dc=com' ,
4744N/A 'uid=user.5000000,ou=People,dc=com' ,
4744N/A 'uid=user.5999999,ou=People,dc=com'] ,
4744N/A 'startDS' : 'no'
4744N/A }
4744N/A </call>
4744N/A
4618N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Delete the ldif file.' }
4744N/A </call>
4744N/A
4744N/A <call function="'deleteFile'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME,
4744N/A 'filename' : ldifFile
4744N/A }
4744N/A </call>
4744N/A
4744N/A <call function="'testStep'">
4744N/A { 'stepMessage' : 'Delete the template file.' }
4744N/A </call>
4744N/A
4744N/A <call function="'deleteFile'">
4744N/A {
4744N/A 'location' : STAF_REMOTE_HOSTNAME,
4744N/A 'filename' : ldifTemplate
4744N/A }
4744N/A </call>
4744N/A
5073N/A </sequence>
4744N/A
5073N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
4744N/A <message log="1" level="'fatal'">
4744N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
4744N/A </message>
4744N/A </catch>
4744N/A <finally>
4744N/A <sequence>
4744N/A <call function="'testCase_Postamble'"/>
4744N/A </sequence>
4744N/A </finally>
4744N/A </try>
4744N/A </sequence>
4744N/A </testcase>
4744N/A </function>
4744N/A
4744N/A</stax>
4744N/A