3212N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
3212N/A ! The contents of this file are subject to the terms of the 3212N/A ! Common Development and Distribution License, Version 1.0 only 3212N/A ! (the "License"). You may not use this file except in compliance 3212N/A ! See the License for the specific language governing permissions 3212N/A ! and limitations under the License. 3212N/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 3212N/A ! Portions Copyright [yyyy] [name of copyright owner] 4618N/A ! Copyright 2007-2009 Sun Microsystems, Inc. 3212N/A <
defaultcall function="plugins_7bit"/>
3212N/A <
function name="plugins_7bit" scope="local">
4618N/A <
block name="STAXCurrentFunction">
4618N/A CurrentTestPath['suite']=STAXCurrentFunction
4618N/A <
call function="'testSuite_Preamble'" />
4618N/A <
call function="'common_setup'">
4618N/A <!--- Test Suite information 4618N/A #@TestSuiteName Plugin 7bit 4618N/A #@TestSuitePurpose Verify the plugin 7bit 4618N/A #@TestName Plugin 7bit setup 4618N/A #@TestPurpose Plugins 7bit setup 4618N/A #@TestStep enable the 7-bit plugin 4618N/A <
testcase name="getTestCaseName('Plugins 7-Bit Clean setup')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A <
message>'-- Enable the plugin 7-Bit Clean --'</
message>
4618N/A <
call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'subcommand' : 'set-plugin-prop' ,
4618N/A 'objectType' : 'plugin-name',
4618N/A 'objectName' : '7-Bit Clean',
4618N/A 'optionsString' : '--set enabled:true',
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A #@TestName Plugin 7bit with default attribute-type 4618N/A #@TestPurpose Check the server behavior when the plugin 7bit is activated 4618N/A #@TestStep Enable the plugin 7bit 4618N/A #@TestStep Add an entry with a userPassword containing a non-ASCII 4618N/A #@TestResult The test is passed if the add operation is rejected 4618N/A <
testcase name="getTestCaseName('Plugins 7bit Clean with default attribute-type')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A <
message>'###### Add an entry ###### '</
message>
4618N/A <
call function="'addAnEntry'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'DNToAdd' : 'uid=testuser_7bit,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A 'listAttributes' : listAttr,
4618N/A <
message>'###### Cleanup ###### '</
message>
4618N/A <
message>'-- Delete the test entry --'</
message>
4618N/A <
call function="'DeleteEntry'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'dsBaseDN' : 'uid=testuser_7bit,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A #@TestName Plugin 7bit with a new attribute-type 4618N/A #@TestPurpose Check the serve behavior when the plugin 7bit is checked on a new attribut-type 4618N/A #@TestStep set a new attribut-type to the attribut street 4618N/A #@TestStep Add an entry with the attribut street containing a non-ASCII character 4618N/A #@TestResult The test is passed if the add operation is rejected 4618N/A <
testcase name="getTestCaseName('Plugins 7bit Clean with a new attribute-type')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A <
message>'-- configure a new attribute-type for the plugin 7-Bit --'</
message>
4618N/A <
call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'subcommand' : 'set-plugin-prop' ,
4618N/A 'objectType' : 'plugin-name',
4618N/A 'objectName' : '7-Bit Clean',
4618N/A 'optionsString' : '--add attribute-type:street',
4618N/A <
message>'###### Add an entry ###### '</
message>
4618N/A <
call function="'addAnEntry'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'DNToAdd' : 'uid=testuser_7bit,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A 'listAttributes' : listAttr,
4618N/A <
message>'###### Cleanup ###### '</
message>
4618N/A <
message>'-- Delete the test entry --'</
message>
4618N/A <
call function="'DeleteEntry'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'dsBaseDN' : 'uid=testuser_7bit,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A #@TestName disable Plugin 7bit 4618N/A #@TestPurpose Check the server behavior when the plugin 7bit is disabled 4618N/A #@TestStep Disable the plugin 7-bit clean 4618N/A #@TestStep Add an entry with the attribut street containing a non-ASCII character 4618N/A #@TestResult The test is passed if the add operation is accepted 4618N/A <
testcase name="getTestCaseName('Plugins 7bit Clean is disabled')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A <
message>'-- disable the plugin 7-Bit Clean --'</
message>
4618N/A <
call function="'dsconfig'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'subcommand' : 'set-plugin-prop' ,
4618N/A 'objectType' : 'plugin-name',
4618N/A 'objectName' : '7-Bit Clean',
4618N/A 'optionsString' : '--set enabled:false',
4618N/A <
message>'###### Add an entry ###### '</
message>
4618N/A <
call function="'addAnEntry'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'DNToAdd' : 'uid=testuser_7bit,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A 'listAttributes' : listAttr,
4618N/A <
message>'###### Cleanup ###### '</
message>
4618N/A <
message>'-- Delete the test entry --'</
message>
4618N/A <
call function="'DeleteEntry'">
4618N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4618N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
4618N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4618N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4618N/A 'dsBaseDN' : 'uid=testuser_7bit,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A <!-- Test Suite Cleanup --> 4618N/A <
message>'Finally: Global 7 Bit Plugin Cleanup.'</
message>
4618N/A <
call function="'common_cleanup'" />
4618N/A <
catch exception="'STAFException'">
4618N/A <
message log="1" level="'fatal'">'Cleanup of test suite failed.'</
message>
4618N/A <
call function="'testSuite_Postamble'"/>