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

Christophe Sovant
09.26.2013 2c551686af7cf4b59119469133d0d1ae037822d6
Updated privileges tests after fix for issue OPENDJ-1107 and fixed problem with jstack on Windows
3 files modified
99 ■■■■ changed files
opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_export_task.xml 52 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_import_task.xml 41 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/utils.xml 6 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_export_task.xml
@@ -115,13 +115,20 @@
                <script>
                 resultString = STAXResult[0][1]
                 msg1 = 'The server rejected the task for the following reason:'
                 msg2 = 'cannot be added due%sto insufficient access rights' % newLine
                </script>
                <call function="'searchString'">
                { 'expectedString' : 'Tasks cannot be%sadded due to insufficient access rights' % newLine,
                  'returnString'   : resultString,
                  'knownIssue'     : 'OPENDJ-1107'
                }
                { 'expectedString' : msg1 ,
                  'returnString'   : resultString
                  }
                </call>
                <call function="'searchString'">
                { 'expectedString' : msg2 ,
                  'returnString'   : resultString
                  }
                </call>
                  
                <message>
@@ -155,13 +162,20 @@
                <script>
                 resultString = STAXResult[0][1]
                 msg1 = 'The server rejected the task for the following reason:'
                 msg2 = 'cannot be added due%sto insufficient access rights' % newLine
                </script>
                 <call function="'searchString'">
                { 'expectedString' : 'Tasks cannot be%sadded due to insufficient access rights' % newLine,
                  'returnString'   : resultString,
                  'knownIssue'     : 'OPENDJ-1107'
                }
                <call function="'searchString'">
                { 'expectedString' : msg1 ,
                  'returnString'   : resultString
                  }
                </call>
                <call function="'searchString'">
                { 'expectedString' : msg2 ,
                  'returnString'   : resultString
                  }
                </call>
                  
                <message>
@@ -242,12 +256,20 @@
                <script>
                 resultString = STAXResult[0][1]
                 msg1 = 'The server rejected the task for the following reason:'
                 msg2 = 'cannot be added due%sto insufficient access rights' % newLine
                </script>
                 <call function="'searchString'">
                { 'expectedString' : 'Tasks cannot be%sadded due to insufficient access rights' % newLine,
                  'returnString'     : resultString
                }
                <call function="'searchString'">
                { 'expectedString' : msg1 ,
                  'returnString'   : resultString
                  }
                </call>
                <call function="'searchString'">
                { 'expectedString' : msg2 ,
                  'returnString'   : resultString
                  }
                </call>
                       
                <call function="'testCase_Postamble'"/>
@@ -326,7 +348,7 @@
                </script>
                 <call function="'searchString'">
                { 'expectedString' : 'You do not have sufficient privileges to initiate an LDIF export',
                { 'expectedString' : 'You do not have%ssufficient privileges to initiate an LDIF export' % newLine,
                  'returnString'     : resultString
                }
                </call>
@@ -447,7 +469,7 @@
                </script>
                 <call function="'searchString'">
                { 'expectedString' : 'You do not have sufficient privileges to initiate an LDIF export',
                { 'expectedString' : 'You do not have%ssufficient privileges to initiate an LDIF export' % newLine,
                  'returnString'     : resultString
                }
                </call>
opends/tests/staf-tests/functional-tests/testcases/privileges/privileges_import_task.xml
@@ -115,15 +115,22 @@
                  <script>
                   resultString = STAXResult[0][1]
                   msg1 = 'The server rejected the task for the following reason:'
                   msg2 = 'cannot be added due%sto insufficient access rights' % newLine
                  </script>
                  <call function="'searchString'">
                  { 'expectedString' : 'Tasks cannot be%sadded due to insufficient access rights' % newLine,
                    'returnString'   : resultString ,
                    'knownIssue'     : 'OPENDJ-1107'
                  { 'expectedString' : msg1 ,
                    'returnString'   : resultString
                    }
                  </call>
                  <call function="'searchString'">
                  { 'expectedString' : msg2 ,
                    'returnString'   : resultString
                    }
                  </call>
                  <message>
                     'Privileges: Import Tasks: import-ldif, Admin adding privilege'
                  </message>
@@ -287,12 +294,20 @@
                  <script>
                   resultString = STAXResult[0][1]
                   msg1 = 'The server rejected the task for the following reason:'
                   msg2 = 'You do not have%ssufficient privileges to initiate an LDIF import' % newLine
                  </script>
                  <call function="'searchString'">
                   { 'returnString'       : resultString ,
                       'expectedString'   : 'You do not have sufficient privileges to initiate an LDIF import'
                   }
                  { 'expectedString' : msg1 ,
                    'returnString'   : resultString
                    }
                  </call>
                  <call function="'searchString'">
                  { 'expectedString' : msg2 ,
                    'returnString'   : resultString
                    }
                  </call>
                  
                  <message>
@@ -422,11 +437,19 @@
                  <script>
                   resultString = STAXResult[0][1]
                   msg1 = 'The server rejected the task for the following reason:'
                   msg2 = 'You do not have%ssufficient privileges to initiate an LDIF import' % newLine
                  </script>
                  <call function="'searchString'">
                    { 'returnString'       : resultString ,
                       'expectedString'   : 'You do not have sufficient privileges to initiate an LDIF import'
                  { 'expectedString' : msg1 ,
                    'returnString'   : resultString
                    }
                  </call>
                  <call function="'searchString'">
                  { 'expectedString' : msg2 ,
                    'returnString'   : resultString
                    }
                  </call>
                  
opends/tests/staf-tests/shared/functions/utils.xml
@@ -2203,8 +2203,12 @@
      
          cmd = '%s/bin/jstack' % JAVA_HOME
          env = ['JAVA_HOME=%s' % JAVA_HOME]
          cmdOptions = '-l %s' % pid
          
          if is_windows_platform(location):
            cmdOptions = '-l %s' % pidSTAXResult
          else:
            cmdOptions = '-l %s' % pid
          outputPath = '%s/..' % (dsPath)
      </script>