mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

el_kaboing
24.02.2007 e12dc597a747f4eae88eb89e9a1258887c2517e4
The new global ACIs that were recently committed are now accounted for in the ACI functional tests.
2 files added
3 files modified
179 ■■■■■ changed files
opends/tests/functional-tests/shared/data/aci/aci_reset_global_search.ldif 31 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/aci/aci_rm_global_search.ldif 31 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/aci/aci_target.xml 39 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/aci/aci_targetattr.xml 39 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/aci/aci_targetfilter.xml 39 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/aci/aci_reset_global_search.ldif
New file
@@ -0,0 +1,31 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE
# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# by brackets "[]" replaced with your own identifying information:
#      Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#      Portions Copyright 2007 Sun Microsystems, Inc.
#
dn: cn=Access Control Handler,cn=config
changetype: modify
add: ds-cfg-global-aci
ds-cfg-global-aci: (targetattr!="userPassword||authPassword")(version 3.0; acl "Anonymous read access"; allow (read,search,compare) userdn="ldap:///anyone";)
opends/tests/functional-tests/shared/data/aci/aci_rm_global_search.ldif
New file
@@ -0,0 +1,31 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE
# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# by brackets "[]" replaced with your own identifying information:
#      Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#      Portions Copyright 2007 Sun Microsystems, Inc.
#
dn: cn=Access Control Handler,cn=config
changetype: modify
delete: ds-cfg-global-aci
ds-cfg-global-aci: (targetattr!="userPassword||authPassword")(version 3.0; acl "Anonymous read access"; allow (read,search,compare) userdn="ldap:///anyone";)
opends/tests/functional-tests/testcases/aci/aci_target.xml
@@ -72,6 +72,22 @@
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'ACI: Target: Preamble - Removing Search Global ACI'
                </message>
                <call function="'modifyEntry'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                    'entryToBeModified'   : '%s/aci/aci_rm_global_search.ldif' % STAGED_DATA_DIR }
                </call>
                <if expr="RC != 0">
                    <tcstatus result="'fail'"/>
                </if>
                <message>
                   'ACI: Target: Preamble - existing branch, user searching entry that will be targeted in future tests'
                </message>
    
@@ -1486,11 +1502,32 @@
               returnString = STAXResult[0][1]
              </script> 
  
              <call function="'checktestStringNotPresent'">
              <call function="'searchStringForSubstring'">
                  { 'returnString'       : returnString ,
                    'testString'         : 'dn: uid=scarter,ou=People,ou=non-aci branch,o=ACI Tests' }
              </call>
              
              <if expr="returnCode != '0'">
                  <tcstatus result="'fail'"/>
              </if>
                <message>
                   'ACI: Target: Resetting Search Global ACI'
                </message>
                <call function="'modifyEntry'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                    'entryToBeModified'   : '%s/aci/aci_reset_global_search.ldif' % STAGED_DATA_DIR }
                </call>
                <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult }
                </call>
              <call function="'testCase_Postamble'"/>
  
            </sequence>
opends/tests/functional-tests/testcases/aci/aci_targetattr.xml
@@ -70,6 +70,22 @@
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                   'ACI: Targetattr: Preamble - Removing Search Global ACI'
                </message>
                <call function="'modifyEntry'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                    'entryToBeModified'   : '%s/aci/aci_rm_global_search.ldif' % STAGED_DATA_DIR }
                </call>
                <if expr="RC != 0">
                    <tcstatus result="'fail'"/>
                </if>
              <message>
                 'ACI: Targetattr: Preamble - existing branch, user searching entry that will be targeted in future tests'
              </message>
  
@@ -1373,11 +1389,32 @@
               returnString = STAXResult[0][1]
              </script> 
  
              <call function="'checktestStringNotPresent'">
              <call function="'searchStringForSubstring'">
                  { 'returnString'       : returnString ,
                    'testString'         : 'dn: uid=tmorris,ou=People,ou=non-aci branch,o=ACI Tests' }
              </call>
              
              <if expr="returnCode != '0'">
                  <tcstatus result="'fail'"/>
              </if>
                <message>
                   'ACI: Targetattr: Postamble - Resetting Search Global ACI'
                </message>
                <call function="'modifyEntry'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                    'entryToBeModified'   : '%s/aci/aci_reset_global_search.ldif' % STAGED_DATA_DIR }
                </call>
                <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult }
                </call>
              <call function="'testCase_Postamble'"/>
  
            </sequence>
opends/tests/functional-tests/testcases/aci/aci_targetfilter.xml
@@ -70,6 +70,22 @@
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'ACI: Targetfilter: Preamble - Removing Search Global ACI'
                </message>
                <call function="'modifyEntry'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                    'entryToBeModified'   : '%s/aci/aci_rm_global_search.ldif' % STAGED_DATA_DIR }
                </call>
                <if expr="RC != 0">
                    <tcstatus result="'fail'"/>
                </if>
                <message>
                   'ACI: Targetfilter: Preamble - user searching entry that will be targeted in future tests'
                </message>
    
@@ -3070,11 +3086,32 @@
               returnString = STAXResult[0][1]
              </script> 
  
              <call function="'checktestStringNotPresent'">
              <call function="'searchStringForSubstring'">
                  { 'returnString'       : returnString ,
                    'testString'         : 'dn: uid=dmiller,ou=People,ou=non-aci branch,o=ACI Tests' }
              </call>
              
              <if expr="returnCode != '0'">
                  <tcstatus result="'fail'"/>
              </if>
              <message>
                   'ACI: Targetfilter: Postamble - Resetting Search Global ACI'
              </message>
              <call function="'modifyEntry'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                    'entryToBeModified'   : '%s/aci/aci_reset_global_search.ldif' % STAGED_DATA_DIR }
              </call>
              <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult }
              </call>
              <call function="'testCase_Postamble'"/>
  
            </sequence>