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

      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 
      }
      

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

                Created:
                Updated:
                Resolved: