importldif_basic_tests.xml revision 6982
6360N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
6360N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
6360N/A<!--
6360N/A ! CDDL HEADER START
6360N/A !
6360N/A ! The contents of this file are subject to the terms of the
6360N/A ! Common Development and Distribution License, Version 1.0 only
6360N/A ! (the "License"). You may not use this file except in compliance
6360N/A ! with the License.
6360N/A !
6360N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6360N/A ! or http://forgerock.org/license/CDDLv1.0.html.
6360N/A ! See the License for the specific language governing permissions
6360N/A ! and limitations under the License.
6360N/A !
6360N/A ! When distributing Covered Code, include this CDDL HEADER in each
6360N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6360N/A ! If applicable, add the following below this CDDL HEADER, with the
6360N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6360N/A ! information:
6360N/A ! Portions Copyright [yyyy] [name of copyright owner]
6360N/A !
6360N/A ! CDDL HEADER END
6360N/A !
6360N/A ! Copyright 2012 ForgeRock AS.
6360N/A ! -->
6360N/A<stax>
6360N/A
6360N/A <!-- Definition of Test Cases -->
6360N/A
6360N/A <!--- Test Cases : ImportLDIF: Binary Attributes -->
6360N/A
6360N/A <!--- Test Case information
6360N/A #@TestMarker ImportLDIF: Out of Box
6360N/A #@TestName ImportLDIF: Out of Box
6360N/A #@TestID importldif_basic_001
6360N/A #@TestPurpose Verify import LDIF with out of box settings
6360N/A #@TestPreamble Common Setup
6360N/A #@TestStep Make template for makeldif.
6360N/A #@TestStep Create ldif file for import using makeldif.
6360N/A #@TestStep Import the LDIF file.
6360N/A #@TestStep Start the Directory Server.
6360N/A #@TestStep Verify import LDIF operations.
6360N/A #@TestPostamble Common Cleanup
6360N/A #@TestResult Test is successful if the result code is 0
6360N/A -->
6360N/A <function name="importldif_basic_001" scope="local">
6360N/A <testcase name="getTestCaseName('Out of Box')">
6360N/A <sequence>
6360N/A <try>
6360N/A <sequence>
6360N/A
6360N/A <call function="'testCase_Preamble'"/>
6360N/A <message>
6360N/A 'Test Name = %s' % STAXCurrentTestcase
6360N/A </message>
6360N/A
6360N/A <call function="'testCase_Preamble'"/>
6360N/A <message>
6360N/A 'Import Ldif: Out-Of-Box: Preamble - Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
6360N/A </message>
6360N/A
6360N/A <call function="'StopDsWithScript'">
6360N/A { 'location' : STAF_REMOTE_HOSTNAME,
6360N/A 'dsHost' : DIRECTORY_INSTANCE_HOST,
6360N/A 'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
6360N/A 'dsBindDN' : DIRECTORY_INSTANCE_DN,
6360N/A 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
6360N/A </call>
6360N/A
6360N/A <message>
6360N/A 'Import Ldif: Out-Of-Box: Preamble - Make an make-ldif template file'
6360N/A </message>
6360N/A
6360N/A <script>
6360N/A numberOfEntries=15000000
6360N/A </script>
6360N/A
6360N/A <call function="'MakeAMakeLdifTemplate'">
6360N/A { 'numEntries' : numberOfEntries ,
6360N/A 'templateFile' : '%s/import_Entries_150k.template' % (remote.temp) }
6360N/A </call>
6360N/A
6360N/A <message>
6360N/A 'Import Ldif: Out-Of-Box: Preamble - Make the ldif file'
6360N/A </message>
6360N/A
6360N/A <call function="'MakeLdifWithScript'">
6360N/A { 'templateFile' : '%s/import_Entries_150k.template' % (remote.temp) ,
6360N/A 'ldifFile' : '%s/import_Entries_150k.ldif' % (remote.temp) }
6360N/A </call>
6360N/A
6360N/A <message>
6360N/A 'Import Ldif: Out-Of-Box: Import large ldif file'
6360N/A </message>
6360N/A
6360N/A <call function="'ImportLdifWithScript'">
6360N/A { 'location' : STAF_REMOTE_HOSTNAME ,
6360N/A 'ldifFile' : '%s/import_Entries_150k.ldif' % remote.temp,
6360N/A 'backEnd' : 'userRoot'}
6360N/A </call>
6360N/A
6360N/A <script>
6360N/A returnString = STAXResult[0][1]
6360N/A </script>
6360N/A
6360N/A <call function="'checktestString'">
6360N/A { 'returnString' : returnString ,
6360N/A 'expectedString' : 'skipped 0, rejected 0' }
6360N/A </call>
6360N/A
6360N/A <message>
6360N/A 'Import Ldif: Out-Of-Box: Start DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
6360N/A </message>
6360N/A
6360N/A <call function="'StartDsWithScript'">
6360N/A { 'location' : STAF_REMOTE_HOSTNAME }
6360N/A </call>
6360N/A
6360N/A <!--- Check that DS started -->
6360N/A <call function="'isAlive'">
6360N/A { 'noOfLoops' : 10 ,
6360N/A 'noOfMilliSeconds' : 5000 }
6360N/A </call>
6360N/A
6360N/A <message>
6360N/A 'Import Ldif: Out-Of-Box: Search for certain entries that were imported'
6360N/A </message>
6360N/A
6360N/A <call function="'checkImport'">
6360N/A { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
6360N/A 'uid=user.10000,ou=People,dc=com' ,
6360N/A 'uid=user.100000,ou=People,dc=com' ,
6360N/A 'uid=user.1000000,ou=People,dc=com' ,
6360N/A 'uid=user.14000000,ou=People,dc=com' ,
6360N/A 'uid=user.14999999,ou=People,dc=com'] ,
6360N/A 'startDS' : 'no'
6360N/A }
6360N/A </call>
6360N/A
6360N/A </sequence>
6360N/A
6360N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
6360N/A <message log="1" level="'fatal'">
6360N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
6360N/A </message>
6360N/A </catch>
6360N/A <finally>
6360N/A <sequence>
6360N/A <call function="'testCase_Postamble'"/>
6360N/A </sequence>
6360N/A </finally>
6360N/A </try>
6360N/A </sequence>
6360N/A </testcase>
6360N/A </function>
6360N/A
6360N/A</stax>
6360N/A