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
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams ! Copyright 2012 ForgeRock AS.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!-- Definition of Test Cases -->
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!--- Test Cases : ImportLDIF: Binary Attributes -->
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!--- Test Case information
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestMarker ImportLDIF: Out of Box
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestName ImportLDIF: Out of Box
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestID importldif_basic_001
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPurpose Verify import LDIF with out of box settings
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPreamble Common Setup
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestStep Make template for makeldif.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestStep Create ldif file for import using makeldif.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestStep Import the LDIF file.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestStep Start the Directory Server.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestStep Verify import LDIF operations.
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestPostamble Common Cleanup
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams #@TestResult Test is successful if the result code is 0
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <function name="importldif_basic_001" scope="local">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <testcase name="getTestCaseName('Out of Box')">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Test Name = %s' % STAXCurrentTestcase
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Import Ldif: Out-Of-Box: Preamble - Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'location' : STAF_REMOTE_HOSTNAME,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'dsHost' : DIRECTORY_INSTANCE_HOST,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Import Ldif: Out-Of-Box: Preamble - Make an make-ldif template file'
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams numberOfEntries=15000000
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'numEntries' : numberOfEntries ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'templateFile' : '%s/import_Entries_150k.template' % (remote.temp) }
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Import Ldif: Out-Of-Box: Preamble - Make the ldif file'
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'templateFile' : '%s/import_Entries_150k.template' % (remote.temp) ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'ldifFile' : '%s/import_Entries_150k.ldif' % (remote.temp) }
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Import Ldif: Out-Of-Box: Import large ldif file'
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'location' : STAF_REMOTE_HOSTNAME ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'ldifFile' : '%s/import_Entries_150k.ldif' % remote.temp,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'backEnd' : 'userRoot'}
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams returnString = STAXResult[0][1]
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'returnString' : returnString ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'expectedString' : 'skipped 0, rejected 0' }
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Import Ldif: Out-Of-Box: Start DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'location' : STAF_REMOTE_HOSTNAME }
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <!--- Check that DS started -->
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'noOfLoops' : 10 ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'noOfMilliSeconds' : 5000 }
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'Import Ldif: Out-Of-Box: Search for certain entries that were imported'
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'uid=user.10000,ou=People,dc=com' ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'uid=user.100000,ou=People,dc=com' ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'uid=user.1000000,ou=People,dc=com' ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'uid=user.14000000,ou=People,dc=com' ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'uid=user.14999999,ou=People,dc=com'] ,
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams 'startDS' : 'no'
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
6858c16497a49284f9fcba5fa12093b121306ca6gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)