2N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
2N/A ! The contents of this file are subject to the terms of the 2N/A ! Common Development and Distribution License, Version 1.0 only 2N/A ! (the "License"). You may not use this file except in compliance 2N/A ! You can obtain a copy of the license at 2N/A ! See the License for the specific language governing permissions 2N/A ! and limitations under the License. 2N/A ! When distributing Covered Code, include this CDDL HEADER in each 2N/A ! file and include the License file at 2N/A ! add the following below this CDDL HEADER, with the fields enclosed 2790N/A ! by brackets "[]" replaced with your own identifying information: 2790N/A ! Portions Copyright [yyyy] [name of copyright owner] 2N/A ! Copyright 2007-2009 Sun Microsystems, Inc. 2N/A <
defaultcall function="plugins_refint"/>
3817N/A <
function name="plugins_refint" scope="local">
2N/A <
block name="STAXCurrentFunction">
59N/A CurrentTestPath['suite']=STAXCurrentFunction
2N/A <
call function="'testSuite_Preamble'" />
2N/A <
call function="'common_setup'">
26N/A 'quickStart' : True ,
2N/A 'startServer' : True ,
26N/A 'stopServer' : False
1470N/A<!--- Test Suite information 181N/A#@TestSuiteName Plugin referential integrity on groups 26N/A#@TestSuitePurpose Validate Plugin referential integrity on groups 3739N/A#@TestMarker Plugin referential integrity on groups 3739N/A#@TestName Plugin referential integrity setup 3817N/A#@TestStep Create the child_staticgroup static Group of users under dc=group,dc=com 26N/A#@TestStep Create the top_staticgroup static Group of users under dc=com 26N/A#@TestPostamble none 26N/A#@TestResult The test is passed if the creation is done 26N/A <
testcase name="getTestCaseName('Setup')">
700N/A <
call function="'testCase_Preamble'"/>
1498N/A <
message>'###### Add user entries ###### '</
message>
151N/A <
iterate var="username" in="['user01','user02','user03','user04','user05','user06','user07']" >
2N/A <
call function="'addAnEntry'">
4747N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4437N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
4437N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
4488N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4488N/A 'DNToAdd' : 'cn=%s,%s' % (username,DIRECTORY_INSTANCE_SFX),
4437N/A 'listAttributes' : listAttr,
26N/A <
message>'###### Add a static Group under dc=group ###### '</
message>
26N/A <
message>' '</
message>
93N/A <
call function="'addAnEntry'">
5329N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5329N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
166N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
26N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
379N/A 'DNToAdd' : 'dc=groups,%s' % DIRECTORY_INSTANCE_SFX,
379N/A 'listAttributes' : listAttr,
4518N/A <!-- Add a static group under dc=groups--> 4353N/A <
call function="'addAnEntry'">
4353N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
4488N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
99N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
59N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
12N/A 'DNToAdd' : 'cn=child_staticgroup,dc=groups,%s' % DIRECTORY_INSTANCE_SFX,
30N/A 'listAttributes' : listAttr,
1256N/A <!-- Add a static group under DIRECTORY_INSTANCE_SFX--> 1256N/A <
call function="'addAnEntry'">
1256N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
1256N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
3109N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
3109N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
3109N/A 'DNToAdd' : 'cn=top_staticgroup,%s' % DIRECTORY_INSTANCE_SFX,
3109N/A 'listAttributes' : listAttr,
3109N/A <!-- Check the group configuration --> 3109N/A <
call function="'SearchObject'">
3109N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
3109N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
3109N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
3109N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
3109N/A 'dsBaseDN' : 'cn=top_staticgroup,%s' % DIRECTORY_INSTANCE_SFX,
3109N/A 'dsFilter' : 'objectclass=groupOfUniqueNames' ,
3109N/A 'attributes' : 'uniqueMember',
1256N/A returnString = STAXResult[0][1]
26N/A <
call function="'searchStringForSubstring'">
1256N/A { 'returnString' : returnString ,
2N/A 'testString' : 'uniqueMember',
26N/A 'expectedResult' : '1' }
185N/A <!-- Check the group configuration --> 2N/A <
call function="'SearchObject'">
255N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
145N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
7N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
26N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
26N/A 'dsBaseDN' : 'cn=child_staticgroup,dc=groups,%s' % DIRECTORY_INSTANCE_SFX,
38N/A 'dsFilter' : 'objectclass=groupOfUniqueNames' ,
26N/A 'attributes' : 'uniqueMember',
26N/A returnString = STAXResult[0][1]
26N/A <
call function="'searchStringForSubstring'">
46N/A { 'returnString' : returnString ,
46N/A 'testString' : 'uniqueMember',
46N/A 'expectedResult' : '1' }
46N/A <
message>'###### Activate the referential integrity plugin. ###### '</
message>
46N/A <
message>' '</
message>
2N/A <
call function="'dsconfig'">
1256N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
1256N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
1256N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
1256N/A 'subcommand' : 'set-plugin-prop' ,
1256N/A 'objectType' : 'plugin-name' ,
2818N/A 'objectName' : 'Referential Integrity',
1256N/A 'optionsString' : '--set enabled:true',
1256N/A <
message>'###### Get the Referential Integrity Plugin ###### '</
message>
2818N/A <
call function="'dsconfig'">
2818N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
1256N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2236N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2236N/A 'subcommand' : 'get-plugin-prop' ,
1256N/A 'objectType' : 'plugin-name' ,
2818N/A 'objectName' : 'Referential Integrity',
1256N/A <
call function="'testCase_Postamble'"/>
3817N/A#@TestMarker Plugin referential integrity on groups 1256N/A#@TestName Referential check is limited to the scope 1256N/A#@TestPurpose Check the referential integrity check is limited to the specified scope 1256N/A#@TestStep Set the base-dn to dc=groups,dc=com 1256N/A#@TestStep Delete the user06 2818N/A#@TestStep The reference must be limited to the scope dc=groups,dc=com 3449N/A#@TestStep The references to the delete user must be removed under cn=child_staticgroup,dc=group,dc=com 3449N/A#@TestStep The references to the delete user must still be present under cn=top_staticgroup,dc=com 3449N/A#@TestResult all steps must be success 1934N/A <
testcase name="getTestCaseName('Check the change of the base-dn attribute')">
2818N/A <
call function="'testCase_Preamble'"/>
1256N/A <
message>'###### Set the base-dn to dc=groups,%s ###### ' % DIRECTORY_INSTANCE_SFX</
message>
1413N/A <
call function="'dsconfig'">
1413N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
1413N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
3739N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
1413N/A 'subcommand' : 'set-plugin-prop' ,
1413N/A 'objectType' : 'plugin-name' ,
1413N/A 'objectName' : 'Referential Integrity',
1413N/A 'optionsString' : '--set base-dn:dc=groups,%s' % DIRECTORY_INSTANCE_SFX,
1256N/A <
call function="'dsconfigGet'">
1256N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
3817N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
1256N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
1256N/A 'propertyName' : 'Referential Integrity',
1256N/A 'attributeName' : 'base-dn'
3449N/A <
message>'###### Delete an user entry###### '</
message>
1256N/A <
call function="'DeleteEntry'">
3109N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
3109N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
3109N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
3109N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
3109N/A 'dsBaseDN' : 'cn=user06,%s' % (DIRECTORY_INSTANCE_SFX),
3109N/A <!-- Check the new configuration is applied --> 3109N/A <
message>'The reference check must be limited to the scope dc=groups,dc=com'</
message>
3109N/A <
message>'The reference check must be done to the base DN dc=groups,dc=com'</
message>
3739N/A <
call function="'SearchObject'">
3109N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
3109N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
3109N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
3109N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
3109N/A 'dsBaseDN' : 'cn=child_staticgroup,dc=groups,%s' % DIRECTORY_INSTANCE_SFX,
3109N/A 'dsFilter' : 'objectclass=groupOfUniqueNames' ,
3109N/A 'attributes' : 'uniquemember',
3817N/A returnString = STAXResult[0][1]
3109N/A <
message>'The references to the delete user must be removed' </
message>
3109N/A <
call function="'searchStringForSubstring'">
3109N/A { 'returnString' : returnString ,
3449N/A <
message>'The reference check must not be done to the base DN dc=com'</
message>
3739N/A <
call function="'SearchObject'">
3109N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
3109N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
3109N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
3109N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
4811N/A 'dsBaseDN' : 'cn=top_staticgroup,%s' % DIRECTORY_INSTANCE_SFX,
4811N/A 'dsFilter' : 'objectclass=groupOfUniqueNames' ,
4811N/A 'attributes' : 'uniquemember',
4811N/A returnString = STAXResult[0][1]
3739N/A <
message>'The references to the delete user must be still present ' </
message>
1256N/A <
call function="'searchStringForSubstring'">
1256N/A { 'returnString' : returnString ,
53N/A <
message>'###### Reset the base-dn ###### '</
message>
46N/A <
message>' '</
message>
26N/A <
call function="'dsconfig'">
181N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
369N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
181N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
181N/A 'subcommand' : 'set-plugin-prop' ,
181N/A 'objectType' : 'plugin-name' ,
181N/A 'objectName' : 'Referential Integrity',
181N/A 'optionsString' : '--reset base-dn',
181N/A <
message>'###### Get the Referential Integrity Plugin ###### '</
message>
2818N/A <
call function="'dsconfig'">
2818N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
26N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
3817N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
3817N/A 'subcommand' : 'get-plugin-prop' ,
3817N/A 'objectType' : 'plugin-name' ,
3817N/A 'objectName' : 'Referential Integrity',
3817N/A <
call function="'testCase_Postamble'"/>
3817N/A#@TestMarker Plugin referential integrity on groups 1549N/A#@TestName The referential integrity plugin removes only references to deleted entries 185N/A#@TestPurpose Check the referential integrity plugin removes only references to deleted entries 145N/A#@TestStep Check that the references to the deleted user are gone. 145N/A#@TestStep Check that there is no impact on the others references. 3817N/A#@TestStep The references to an existing user must still be present. 3817N/A#@TestResult all steps must be success 3817N/A <
testcase name="getTestCaseName('The referential integrity plugin removes only references to deleted entries')">
3817N/A <
call function="'testCase_Preamble'"/>
3817N/A <
message>'###### Delete an user entry###### '</
message>
145N/A <!-- Delete an entry --> 145N/A <
call function="'DeleteEntry'">
145N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
117N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2515N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
84N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
145N/A 'dsBaseDN' : 'cn=user01,%s' % (DIRECTORY_INSTANCE_SFX),
1392N/A <
call function="'SearchObject'">
2515N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
1392N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
1392N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
1392N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
1392N/A 'dsBaseDN' : DIRECTORY_INSTANCE_SFX,
1392N/A 'dsFilter' : 'objectclass=groupOfUniqueNames' ,
38N/A 'attributes' : 'uniquemember',
196N/A returnString = STAXResult[0][1]
185N/A <
message>'references to the delete user must be gone ' </
message>
99N/A <
call function="'searchStringForSubstring'">
46N/A { 'returnString' : returnString ,
2N/A 'testString' : 'user01',
145N/A 'expectedResult' : '0' }
1899N/A <
message>'references to an existing user must be still present' </
message>
26N/A <
call function="'searchStringForSubstring'">
2N/A { 'returnString' : returnString ,
32N/A 'testString' : 'user02',
32N/A <
call function="'testCase_Postamble'"/>
32N/A#@TestMarker Plugin referential integrity on groups 38N/A#@TestName The referential integrity is checked on the specified attribut-type 38N/A#@TestPurpose Check the referential integrity is checked on the specified attribut-type 38N/A#@TestStep Remove the attribute uniquemember from the list of attribute-type 38N/A#@TestStep Delete a user entry 38N/A#@TestStep Check that the references to the deleted user are still present 38N/A#@TestStep Restore the attribute uniquemember from the list of attribute-type 38N/A#@TestPostamble none 38N/A#@TestResult all steps must be success 4811N/A <
testcase name="getTestCaseName('Check the referential integrity is checked on the specified attribut-type')">
26N/A <
call function="'testCase_Preamble'"/>
26N/A <
message>'###### Remove the attribute uniquemember from the list of attribute-type ###### '</
message>
26N/A <
message>' '</
message>
26N/A <
call function="'dsconfig'">
26N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
26N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
26N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5329N/A 'subcommand' : 'set-plugin-prop' ,
5329N/A 'objectType' : 'plugin-name' ,
5329N/A 'objectName' : 'Referential Integrity',
5329N/A 'optionsString' : '--remove attribute-type:uniquemember',
5349N/A <
message>'###### Get the Referential Integrity Plugin ###### '</
message>
5329N/A <
call function="'dsconfig'">
5329N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
5329N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
5329N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
5349N/A 'subcommand' : 'get-plugin-prop' ,
5349N/A 'objectType' : 'plugin-name' ,
5337N/A 'objectName' : 'Referential Integrity',
<
message>'###### Delete an user entry###### '</
message>
<
call function="'DeleteEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=user02,%s' % (DIRECTORY_INSTANCE_SFX),
<!-- Check the new configuration is applied --> <
message>'Check the new configuration is applied'</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : DIRECTORY_INSTANCE_SFX,
'dsFilter' : 'objectclass=groupOfUniqueNames' ,
'attributes' : 'uniquemember',
returnString = STAXResult[0][1]
<
message>'The references to the delete user must be still present ' </
message>
<
call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
<
message>'###### Restore the attribute uniquemember from the list of attribute-type ###### '</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
'optionsString' : '--add attribute-type:uniquemember',
<
message>'###### Get the Referential Integrity Plugin ###### '</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'get-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
<
call function="'testCase_Postamble'"/>
#@TestMarker Plugin referential integrity on groups #@TestName The referential integrity is checked on the specified plugin-type #@TestPurpose Check the referential integrity is checked on the specified plugin-type #@TestStep Remove the plugin-type attribute postoperationdelete #@TestStep Delete the user05 #@TestStep Check that the references to the deleted user are still present #@TestStep Add the plugin-type attribute postoperationdelete #@TestResult all steps must be success <
testcase name="getTestCaseName(' The referential integrity is checked on the specified plugin-type')">
<
call function="'testCase_Preamble'"/>
<
message>'###### Remove the plugin-type attribute postoperationdelete ###### '</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
'optionsString' : '--remove plugin-type:postoperationdelete',
<
message>'###### Get the Referential Integrity Plugin ###### '</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'get-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
<!-- plugin-type attribute is not dynamic. Need to restart the server --> <
call function="'StopDsWithScript'">
{ 'location' : STAF_REMOTE_HOSTNAME,
'dsHost' : DIRECTORY_INSTANCE_HOST,
'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
'dsBindDN' : DIRECTORY_INSTANCE_DN,
'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
<
call function="'StartDsWithScript'">
{ 'location' : STAF_REMOTE_HOSTNAME }
<!--- Check that DS started --> <
call function="'isAlive'">
'noOfMilliSeconds' : 2000
<
message>'###### Delete an user entry###### '</
message>
<
call function="'DeleteEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=user05,%s' % (DIRECTORY_INSTANCE_SFX),
<!-- Check the new configuration is applied --> <
message>'Check the new configuration is applied'</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : DIRECTORY_INSTANCE_SFX,
'dsFilter' : 'objectclass=groupOfUniqueNames' ,
'attributes' : 'uniquemember',
returnString = STAXResult[0][1]
<
message>'The references to the delete user must be still present ' </
message>
<
call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
<
message>'###### Add the plugin-type attribute postoperationdelete ###### '</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
'optionsString' : '--add plugin-type:postoperationdelete',
<
message>'###### Get the Referential Integrity Plugin ###### '</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'get-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
<
call function="'testCase_Postamble'"/>
#@TestMarker Plugin referential integrity on groups #@TestName The referential integrity is disabled #@TestPurpose Check the server behavior when referential integrity is disabled #@TestStep Disable the referential integrity plugin #@TestStep Delete an user #@TestStep Check that the references to the deleted user are still present #@TestResult all steps must be success <
testcase name="getTestCaseName('Referential integrity on groups is disabled')">
<
call function="'testCase_Preamble'"/>
<
message>'###### Disable the referential integrity plugin. ###### '</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
'optionsString' : '--set enabled:false',
<
message>'###### Set the list of attribute-type ###### '</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
'optionsString' : '--set attribute-type:uniquemember',
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
'optionsString' : '--add attribute-type:member',
<
message>'###### Get the Referential Integrity Plugin ###### '</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'get-plugin-prop' ,
'objectType' : 'plugin-name' ,
'objectName' : 'Referential Integrity',
<
message>'###### Delete an user entry###### '</
message>
<
call function="'DeleteEntry'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=user07,%s' % (DIRECTORY_INSTANCE_SFX),
<!-- Check the new configuration is applied --> <
message>'Check the new configuration is applied'</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : DIRECTORY_INSTANCE_SFX,
'dsFilter' : 'objectclass=groupOfUniqueNames' ,
'attributes' : 'uniquemember',
returnString = STAXResult[0][1]
<
message>'The references to the delete user must be still present ' </
message>
<
call function="'searchStringForSubstring'">
{ 'returnString' : returnString ,
<
call function="'testCase_Postamble'"/>
<!-- Test Suite Cleanup --> <
message>'Finally: Global Referential Integrety Plugin Cleanup.'</
message>
<
call function="'common_cleanup'" />
<
catch exception="'STAFException'">
<
message log="1" level="'fatal'">'Cleanup of test suite failed.'</
message>
<
call function="'testSuite_Postamble'"/>