2788N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
2788N/A ! The contents of this file are subject to the terms of the 2788N/A ! Common Development and Distribution License, Version 1.0 only 2788N/A ! (the "License"). You may not use this file except in compliance 2788N/A ! You can obtain a copy of the license at 2788N/A ! See the License for the specific language governing permissions 2788N/A ! and limitations under the License. 2788N/A ! When distributing Covered Code, include this CDDL HEADER in each 2788N/A ! file and include the License file at 2788N/A ! add the following below this CDDL HEADER, with the fields enclosed 2788N/A ! by brackets "[]" replaced with your own identifying information: 2788N/A ! Portions Copyright [yyyy] [name of copyright owner] 3215N/A ! Copyright 2007-2009 Sun Microsystems, Inc. 2788N/A <
defaultcall function="plugins_entryUUID"/>
2788N/A <
function name="plugins_entryUUID" scope="local">
2788N/A <
block name="STAXCurrentFunction">
2788N/A CurrentTestPath['suite']=STAXCurrentFunction
2788N/A <
call function="'testSuite_Preamble'" />
2788N/A <
call function="'common_setup'">
2788N/A <!--- Test Suite information 2788N/A #@TestSuiteName Plugin entryUUID 2788N/A #@TestSuitePurpose Verify the plugin entryUUID 2788N/A #@TestMarker Plugin entryUUID 2788N/A #@TestName Plugin entryUUID setup 2788N/A #@TestPurpose Plugins entryUUID setup 2788N/A #@TestStep Disable the virtual attribute entryUUID 2788N/A <
testcase name="getTestCaseName('Plugins entryUUID setup')">
2788N/A <
call function="'testCase_Preamble'"/>
2788N/A <
message>'-- Disable the virtual attribute entryUUID --'</
message>
2788N/A <
call function="'dsconfig'">
2788N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
2788N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2788N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'subcommand' : 'set-virtual-attribute-prop' ,
2788N/A 'objectName' : 'entryUUID',
2788N/A 'optionsString' : '--set enabled:false',
2788N/A <
call function="'testCase_Postamble'"/>
2949N/A #@TestMarker Plugin entryUUID 2950N/A #@TestName Plugin entryUUID enable 2949N/A #@TestPurpose Check the serve behavior when the plugin entryUUID is activated 2949N/A #@TestStep Enable the plugin entryUUID 3951N/A #@TestStep Disable the virtual attribute entryUUID 3951N/A #@TestStep Execute ldapsearch request to get entryUUID attribute 3951N/A #@TestResult The test is passed if the attribute entryUUID is returned 2788N/A <
testcase name="getTestCaseName('Plugins entryUUID enable')">
2788N/A <
call function="'testCase_Preamble'"/>
2788N/A <
message>'-- Activate the entryUUID plugin --'</
message>
2788N/A <
call function="'dsconfig'">
2788N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
2788N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2788N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'subcommand' : 'set-plugin-prop' ,
2788N/A 'objectType' : 'plugin-name' ,
2788N/A 'objectName' : 'Entry UUID',
2788N/A 'optionsString' : '--set enabled:true',
2788N/A <
message>'###### Add an entry ###### '</
message>
2949N/A <
call function="'addAnEntry'">
2949N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2949N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
3951N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
3951N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'DNToAdd' : 'uid=testuser_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
2788N/A 'listAttributes' : listAttr,
2788N/A <
message>'###### Check the plugin entryUUID ###### '</
message>
2788N/A <
call function="'SearchObject'">
2788N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2788N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2788N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
2788N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'dsBaseDN' : 'uid=testuser_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
2788N/A 'dsFilter' : 'objectclass=*' ,
2788N/A 'attributes' : 'entryUUID',
2788N/A returnString = STAXResult[0][1]
2788N/A <
call function="'searchStringForSubstring'">
2788N/A { 'returnString' : returnString,
2788N/A 'testString' : 'entryUUID',
2788N/A <
message>'###### Cleanup ###### '</
message>
2788N/A <
message>'-- Delete the test entry --'</
message>
2788N/A <
call function="'DeleteEntry'">
2788N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2788N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2788N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2788N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'dsBaseDN' : 'uid=testuser_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
2788N/A <
message>'-- Disable the entryUUID plugin --'</
message>
2788N/A <
call function="'dsconfig'">
2788N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
2788N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2788N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'subcommand' : 'set-plugin-prop' ,
2788N/A 'objectType' : 'plugin-name' ,
2788N/A 'objectName' : 'Entry UUID',
2788N/A 'optionsString' : '--set enabled:false',
2788N/A <
call function="'testCase_Postamble'"/>
2788N/A #@TestMarker Plugin entryUUID 2788N/A #@TestName Plugin entryUUID disable 2788N/A #@TestPurpose Check the server behavior when the plugin entryUUID is disabled 2788N/A #@TestStep Disable the plugin entryUUID 2788N/A #@TestStep Disable the virtual attribute entryUUID 2788N/A #@TestStep Execute ldapsearch request to get entryUUID attribute 2788N/A #@TestResult The test is passed if the attribute entryUUID is not returned 2788N/A <
testcase name="getTestCaseName('Plugins entryUUID disable')">
2788N/A <
call function="'testCase_Preamble'"/>
2788N/A <
message>'-- Disable the entryUUID plugin --'</
message>
2788N/A <
call function="'dsconfig'">
2788N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
2788N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2788N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'subcommand' : 'set-plugin-prop' ,
2788N/A 'objectType' : 'plugin-name' ,
2788N/A 'objectName' : 'Entry UUID',
2788N/A 'optionsString' : '--set enabled:false',
2788N/A <
message>'###### Add an entry ###### '</
message>
2788N/A <
call function="'addAnEntry'">
2788N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2788N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2788N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2788N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'DNToAdd' : 'uid=testuser_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
2788N/A 'listAttributes' : listAttr,
2788N/A <!-- The plugin is disabled. the attribute entryUUID should not be returned --> 2788N/A <
message>'###### Check the plugin entryUUID ###### '</
message>
2788N/A <
call function="'SearchObject'">
2788N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2788N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2788N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
2788N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'dsBaseDN' : 'uid=testuser_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
2788N/A 'dsFilter' : 'objectclass=*' ,
2788N/A 'attributes' : 'entryUUID',
2788N/A returnString = STAXResult[0][1]
2788N/A <
call function="'searchStringForSubstring'">
2788N/A { 'returnString' : returnString ,
2788N/A 'testString' : 'entryUUID',
2788N/A <
message>'###### Cleanup ###### '</
message>
2788N/A <
message>'-- Delete the test entry --'</
message>
2788N/A <
call function="'DeleteEntry'">
2788N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2788N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2788N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2788N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2788N/A 'dsBaseDN' : 'uid=testuser_entryuuid,%s' % DIRECTORY_INSTANCE_SFX,
2788N/A <
call function="'testCase_Postamble'"/>
2788N/A <!-- Test Suite Cleanup --> 2788N/A <
message>'Finally: Global UUID Plugin Cleanup.'</
message>
2788N/A <
call function="'common_cleanup'" />
2788N/A <
catch exception="'STAFException'">
2788N/A <
message log="1" level="'fatal'">'Cleanup of test suite failed.'</
message>
2788N/A <
call function="'testSuite_Postamble'"/>