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

mkeyes
11.18.2007 a32642866813f592618e506c895e07dc25faddbf
Some syntax test cases for the functional tests for ACI bind types.
4 files added
2 files modified
345 ■■■■■ changed files
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci1.ldif 2 ●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci2.ldif 30 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci3.ldif 30 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci4.ldif 30 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci5.ldif 30 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/aci/aci_bindtypes.xml 223 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci1.ldif
@@ -26,5 +26,5 @@
dn: ou=aci branch, o=Bind Type Tests, o=ACI Tests, dc=example,dc=com
changetype: modify
add: aci
aci: (targetattr="*")(version 3.0; acl "add_userattr_aci1"; allow (search,read) userattr="l#Austin || l#Grenoble";)
aci: (targetattr="*")(version 3.0; acl "add_syntax_aci1"; allow (search,read) groupdn="ldap://cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com";)
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci2.ldif
New file
@@ -0,0 +1,30 @@
# 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: ou=aci branch, o=Bind Type Tests, o=ACI Tests, dc=example,dc=com
changetype: modify
add: aci
aci: (targetattr="*")(version 3.0; acl "add_syntax_aci2"; allow (search,read) groupdn='ldap:///cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com';)
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci3.ldif
New file
@@ -0,0 +1,30 @@
# 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: ou=aci branch, o=Bind Type Tests, o=ACI Tests, dc=example,dc=com
changetype: modify
add: aci
aci: (targetattr="*")(version 3.0; acl "add_syntax_aci3"; allow (search,read) groupdn="";)
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci4.ldif
New file
@@ -0,0 +1,30 @@
# 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: ou=aci branch, o=Bind Type Tests, o=ACI Tests, dc=example,dc=com
changetype: modify
add: aci
aci: (targetattr="*")(version 3.0; acl "add_syntax_aci4"; allow (search,read) userdn="";)
opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_syntax_aci5.ldif
New file
@@ -0,0 +1,30 @@
# 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: ou=aci branch, o=Bind Type Tests, o=ACI Tests, dc=example,dc=com
changetype: modify
add: aci
aci: (targetattr="*")(version 3.0; acl "add_syntax_aci5"; allow (search,read) userattr="";)
opends/tests/functional-tests/testcases/aci/aci_bindtypes.xml
@@ -4118,8 +4118,227 @@
              </sequence>
            </testcase>
            
<!-- syntax tests -->
            <!---
                Place test-specific test information here.
                The tag, TestMarker, must be the same as the tag, TestSuiteName.
                #@TestMarker                ACI Bind Type Tests
                #@TestName                  syntax - groupdn with missing slash
                #@TestIssue                 455
                #@TestPurpose               Test behavior with groupdn with missing slash in the url
                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
                #@TestStep                  Client searches entry in the targeted branch dn as a group member.
                #@TestPostamble             none
                #@TestResult                Success if OpenDS returns 21.
            -->
            <testcase name="'ACI: Bind Types: groupdn with missing slash'">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <script>
                    curr_aci_ldif_file = 'add_syntax_aci1.ldif'
                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
                </script>
                <message>
                   'ACI: Bind Types: groupdn with missing slash, adding aci,\n %s' % curr_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_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
                </call>
                <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult ,
                      'expected'   : 21 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!---
                Place test-specific test information here.
                The tag, TestMarker, must be the same as the tag, TestSuiteName.
                #@TestMarker                ACI Bind Type Tests
                #@TestName                  syntax - groupdn with single quotes
                #@TestIssue                 455
                #@TestPurpose               Test behavior with groupdn with single quotes
                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
                #@TestStep                  Client searches entry in the targeted branch dn as a group member.
                #@TestPostamble             none
                #@TestResult                Success if OpenDS returns 21.
            -->
            <testcase name="'ACI: Bind Types: groupdn with single quote'">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <script>
                    curr_aci_ldif_file = 'add_syntax_aci2.ldif'
                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
                </script>
                <message>
                   'ACI: Bind Types: groupdn with single quote, adding aci,\n %s' % curr_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_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
                </call>
                <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult ,
                      'expected'   : 21 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!---
                Place test-specific test information here.
                The tag, TestMarker, must be the same as the tag, TestSuiteName.
                #@TestMarker                ACI Bind Type Tests
                #@TestName                  syntax - groupdn is null
                #@TestIssue                 454
                #@TestPurpose               Test behavior with groupdn equals null
                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
                #@TestStep                  Client searches entry in the targeted branch dn as a group member.
                #@TestPostamble             none
                #@TestResult                Success if OpenDS returns 21.
            -->
            <testcase name="'ACI: Bind Types: groupdn with null value'">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <script>
                    curr_aci_ldif_file = 'add_syntax_aci3.ldif'
                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
                </script>
                <message>
                   'ACI: Bind Types: groupdn with null value, adding aci,\n %s' % curr_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_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
                </call>
                <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult ,
                      'expected'   : 21 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!---
                Place test-specific test information here.
                The tag, TestMarker, must be the same as the tag, TestSuiteName.
                #@TestMarker                ACI Bind Type Tests
                #@TestName                  syntax - userdn is null
                #@TestIssue                 453
                #@TestPurpose               Test behavior with userdn equals null
                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
                #@TestStep                  Client searches entry in the targeted branch dn as a group member.
                #@TestPostamble             none
                #@TestResult                Success if OpenDS returns 21.
            -->
            <testcase name="'ACI: Bind Types: userdn with null value'">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <script>
                    curr_aci_ldif_file = 'add_syntax_aci4.ldif'
                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
                </script>
                <message>
                   'ACI: Bind Types: userdn with null value, adding aci,\n %s' % curr_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_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
                </call>
                <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult ,
                      'expected'   : 21 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <!---
                Place test-specific test information here.
                The tag, TestMarker, must be the same as the tag, TestSuiteName.
                #@TestMarker                ACI Bind Type Tests
                #@TestName                  syntax - userattr is null
                #@TestIssue                 455
                #@TestPurpose               Test behavior with userattr equals null
                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
                #@TestStep                  Client searches entry in the targeted branch dn as a group member.
                #@TestPostamble             none
                #@TestResult                Success if OpenDS returns 21.
            -->
            <testcase name="'ACI: Bind Types: userattr with null value'">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <script>
                    curr_aci_ldif_file = 'add_syntax_aci5.ldif'
                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
                </script>
                <message>
                   'ACI: Bind Types: userattr with null value, adding aci,\n %s' % curr_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_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
                </call>
                <call function="'checktestRC'">
                    { 'returncode' : RC ,
                      'result'     : STAXResult ,
                      'expected'   : 21 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
        <!---
              Place test-specific test information here.
              The tag, TestMarker, must be the same as the tag, TestSuiteName.