2454N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
2454N/A ! The contents of this file are subject to the terms of the 2454N/A ! Common Development and Distribution License, Version 1.0 only 2454N/A ! (the "License"). You may not use this file except in compliance 2454N/A ! You can obtain a copy of the license at 2454N/A ! See the License for the specific language governing permissions 2454N/A ! and limitations under the License. 2454N/A ! When distributing Covered Code, include this CDDL HEADER in each 2454N/A ! file and include the License file at 2454N/A ! add the following below this CDDL HEADER, with the fields enclosed 2454N/A ! by brackets "[]" replaced with your own identifying information: 2454N/A ! Portions Copyright [yyyy] [name of copyright owner] 4618N/A ! Copyright 2007-2009 Sun Microsystems, Inc. 2454N/A <
defaultcall function="plugins_entryUUID"/>
2454N/A <
function name="plugins_entryUUID" scope="local">
2454N/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 entryUUID 4618N/A #@TestSuitePurpose Verify the plugin entryUUID 4618N/A #@TestMarker Plugin entryUUID 4618N/A #@TestName Plugin entryUUID setup 4618N/A #@TestPurpose Plugins entryUUID setup 4618N/A #@TestStep Disable the virtual attribute entryUUID 4618N/A <
testcase name="getTestCaseName('Plugins entryUUID setup')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A <
message>'-- Disable the virtual attribute entryUUID --'</
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-virtual-attribute-prop' ,
4618N/A 'objectName' : 'entryUUID',
4618N/A 'optionsString' : '--set enabled:false',
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A #@TestMarker Plugin entryUUID 4618N/A #@TestName Plugin entryUUID enable 4618N/A #@TestPurpose Check the serve behavior when the plugin entryUUID is activated 4618N/A #@TestStep Enable the plugin entryUUID 4618N/A #@TestStep Disable the virtual attribute entryUUID 4618N/A #@TestStep Execute ldapsearch request to get entryUUID attribute 4618N/A #@TestResult The test is passed if the attribute entryUUID is returned 4618N/A <
testcase name="getTestCaseName('Plugins entryUUID enable')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A <
message>'-- Activate the entryUUID plugin --'</
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' : 'Entry UUID',
4618N/A 'optionsString' : '--set enabled:true',
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_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A 'listAttributes' : listAttr,
4618N/A <
message>'###### Check the plugin entryUUID ###### '</
message>
4618N/A <
call function="'SearchObject'">
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_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A 'dsFilter' : 'objectclass=*' ,
4618N/A 'attributes' : 'entryUUID',
4618N/A returnString = STAXResult[0][1]
4618N/A <
call function="'searchStringForSubstring'">
4618N/A { 'returnString' : returnString,
4618N/A 'testString' : 'entryUUID',
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_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A <
message>'-- Disable the entryUUID plugin --'</
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' : 'Entry UUID',
4618N/A 'optionsString' : '--set enabled:false',
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A #@TestMarker Plugin entryUUID 4618N/A #@TestName Plugin entryUUID disable 4618N/A #@TestPurpose Check the server behavior when the plugin entryUUID is disabled 4618N/A #@TestStep Disable the plugin entryUUID 4618N/A #@TestStep Disable the virtual attribute entryUUID 4618N/A #@TestStep Execute ldapsearch request to get entryUUID attribute 4618N/A #@TestResult The test is passed if the attribute entryUUID is not returned 4618N/A <
testcase name="getTestCaseName('Plugins entryUUID disable')">
4618N/A <
call function="'testCase_Preamble'"/>
4618N/A <
message>'-- Disable the entryUUID plugin --'</
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' : 'Entry UUID',
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_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A 'listAttributes' : listAttr,
4618N/A <!-- The plugin is disabled. the attribute entryUUID should not be returned --> 4618N/A <
message>'###### Check the plugin entryUUID ###### '</
message>
4618N/A <
call function="'SearchObject'">
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_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A 'dsFilter' : 'objectclass=*' ,
4618N/A 'attributes' : 'entryUUID',
4618N/A returnString = STAXResult[0][1]
4618N/A <
call function="'searchStringForSubstring'">
4618N/A { 'returnString' : returnString ,
4618N/A 'testString' : 'entryUUID',
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_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
4618N/A <
call function="'testCase_Postamble'"/>
4618N/A <!-- Test Suite Cleanup --> 4618N/A <
message>'Finally: Global UUID 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'"/>