Uploaded image for project: 'KIE Cloud'
  1. KIE Cloud
  2. KIECLOUD-238

Wrong warn log signature in jboss-kie-modules and output on bats file

    XMLWordPrintable

Details

    Description

      The internal test scripts from jboss-kie-modules project are calling the function log_warn from logging.sh with log_warning signature, which is leading to errors like command not found.

      The functions from the jboss-kie-common heavily uses this function, which can make a mess with the return value if outside a Kubernetes environment. A suggestion to fix this is:

      1. Change the function name to log_warning
      2. To not make a mess with the stdout (which is used to return values from functions), redirect the warn and error messages to stderr, like:

      function log_warning() { 
          echo "[WARN]"$1 >&2 
      }
      

      Attachments

        Activity

          People

            rhn-support-zanini Ricardo Zanini Fernandes
            rhn-support-zanini Ricardo Zanini Fernandes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: