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

mkeyes
02.42.2007 81dc97e0ecf87d4dea0c06de635fcc3eb09cc0fe
Finished the functional tests for Issue 1596.
1 files modified
89 ■■■■ changed files
opends/tests/functional-tests/testcases/aci/aci_bindtypes.xml 89 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/aci/aci_bindtypes.xml
@@ -4049,12 +4049,10 @@
                #@TestMarker                ACI Bind Type Tests
                #@TestName                  userattr equals one attr with groupdn, url expression
                #@TestIssue                 455
                #@TestPurpose               Test behavior with userattr equals one attr with groupdn
                #@TestPurpose               Test behavior with userattr equals groupdn with url expression
                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
                #@TestStep                  Client searches entry in the targeted branch dn for entry with group member and matching manager.
                #@TestStep                  Client searches entry in a non-targeted branch dn for entry with group member and matching manager.
                #@TestStep                  Client searches entry in the targeted branch dn for entry with non-group member and no matching manager.
                #@TestStep                  Client searches entry in the targeted branch dn for entry with group member and no matching manager.
                #@TestStep                  Remove aci.
                #@TestStep                  Client searches entry with the previously targeted branch dn.
                #@TestPostamble             none
@@ -4067,26 +4065,32 @@
                <call function="'testCase_Preamble'"/>
                          
                <script>
                    curr_aci_ldif_file = 'add_userattr_aci5.ldif'
                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (logsLocalDataDir,curr_aci_ldif_file));
                    curr_aci="(targetattr=\"*\")(version 3.0; acl \"add_userattr_aci5\"; allow (search,read) userattr=\"ldap:///o=ACI Tests,dc=example,dc=com?manager#GROUPDN\";)"
                </script>
        
                <message>
                   'ACI: Bind Types: userattr equals one attr with groupdn, url expression, preamble adding aci,\n %s' % curr_aci
                </message>
    
                <call function="'modifyEntry'">
                <call function="'modifyAnAttribute'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                    'entryToBeModified'   : '%s/aci/aci_bindtypes/%s' % (logsRemoteDataDir,curr_aci_ldif_file) }
                    'DNToModify'             : 'o=ACI Tests,dc=example,dc=com' ,
                    'attributeName'          : 'aci' ,
                    'newAttributeValue'      : curr_aci ,
                    'changetype'             : 'add' }
                </call>
    
                <if expr="RC != 0">
                    <tcstatus result="'fail'"/>
                </if>
    
                <if expr="RC != 0">
                    <tcstatus result="'fail'"/>
                </if>
                <message>
                   'ACI: Bind Types: userattr equals one attr with groupdn, url expression, user searching targeted entry with group member'
                </message>
@@ -4113,7 +4117,7 @@
                <if expr="returnCode != '1'">
                    <tcstatus result="'fail'"/>
                </if>
<!--    The rest of the test case should be uncommented when Issue 1596 is resolved.
                <call function="'searchStringForSubstring'">
                    { 'returnString'       : returnString ,
                      'testString'         : 'cn:' }
@@ -4133,33 +4137,6 @@
                </if>
    
               <message>
                   'ACI: Bind Types: userattr equals one attr with groupdn, url expression, user searching in non-targeted branch with group member'
                </message>
                <call function="'SearchObject'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : 'uid=cuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
                    'dsInstancePswd'   : 'ACIRules' ,
                    'dsBaseDN'         : 'uid=kwinters,ou=People,ou=non-aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
                    'dsFilter'         : 'objectclass=*'  ,
                    'attributes'       : 'cn sn uid manager' }
                </call>
                <script>
                 returnString = STAXResult[0][1]
                </script>
                <call function="'searchStringForSubstring'">
                    { 'returnString'       : returnString ,
                      'testString'         : 'dn: uid=kwinters,ou=People,ou=non-aci branch,o=Bind Type Tests,o=ACI Tests' }
                </call>
                <if expr="returnCode != '0'">
                    <tcstatus result="'fail'"/>
                </if>
                <message>
                   'ACI: Bind Types: userattr equals one attr with groupdn, url expression, user searching with non-group member'
                </message>
    
@@ -4168,7 +4145,7 @@
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : 'uid=auser,ou=people,o=ACI Tests,dc=example,dc=com' ,
                    'dsInstancePswd'   : 'ACIRules' ,
                    'dsBaseDN'         : 'uid=kwinters,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
                    'dsFilter'         : 'objectclass=*'  ,
                    'attributes'       : 'cn sn uid manager' }
                </call>
@@ -4179,7 +4156,7 @@
    
                <call function="'searchStringForSubstring'">
                    { 'returnString'       : returnString ,
                      'testString'         : 'dn: uid=kwinters,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
                      'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
                </call>
                
                <if expr="returnCode != '0'">
@@ -4187,48 +4164,28 @@
                </if>
    
                <message>
                   'ACI: Bind Types: userattr equals one attr with groupdn, url expression, user searching with different group member'
                </message>
                <call function="'SearchObject'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : 'uid=fuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
                    'dsInstancePswd'   : 'ACIRules' ,
                    'dsBaseDN'         : 'uid=kwinters,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
                    'dsFilter'         : 'objectclass=*'  ,
                    'attributes'       : 'cn sn uid manager' }
                </call>
                <script>
                 returnString = STAXResult[0][1]
                </script>
                <call function="'searchStringForSubstring'">
                    { 'returnString'       : returnString ,
                      'testString'         : 'dn: uid=kwinters,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
                </call>
                <if expr="returnCode != '0'">
                    <tcstatus result="'fail'"/>
                </if>
 -->
                <message>
                   'ACI: Bind Types: userattr equals one attr with groupdn, url expression,, admin deleting aci'
                </message>
    
                <call function="'modifyEntry'">
                <call function="'modifyAnAttribute'">
                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                    'entryToBeModified'   : '%s/aci/aci_bindtypes/del_aci.ldif' % logsRemoteDataDir }
                    'DNToModify'             : 'o=ACI Tests,dc=example,dc=com' ,
                    'attributeName'          : 'aci' ,
                    'newAttributeValue'      : curr_aci ,
                    'changetype'             : 'delete' }
                </call>
    
                <if expr="RC != 0">
                    <tcstatus result="'fail'"/>
                </if>
    
                <if expr="RC != 0">
                    <tcstatus result="'fail'"/>
                </if>
                <message>
                   'ACI: Bind Types: userattr equals one attr with groupdn, url expression, user searching previously targeted entry'
                </message>