[Contrail 4.0] Plugin tests did not pass shellcheck

Bug #1578555 reported by Yevgeniy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel Contrail plugin
Fix Released
Medium
Yevgeniy

Bug Description

Scenario:
  1. Install shellcheck
  2.Run shellcheck for plugin_test/utils/jenkins/system_tests.sh

Actual result:
  yshapovalov@yshapovalov-pc:~/fuel-plugin-contrail$ shellcheck plugin_test/utils/jenkins/system_tests.sh

In plugin_test/utils/jenkins/system_tests.sh line 26:
if [ -z $NODE_VOLUME_SIZE ]; then export NODE_VOLUME_SIZE=350; fi
        ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 27:
if [ -z $OPENSTACK_RELEASE ]; then export OPENSTACK_RELEASE=Ubuntu; fi
        ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 28:
if [ -z $ENV_NAME ]; then export ENV_NAME="contrail"; fi
        ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 29:
if [ -z $ADMIN_NODE_MEMORY ]; then export ADMIN_NODE_MEMORY=4096; fi
        ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 30:
if [ -z $ADMIN_NODE_CPU ]; then export ADMIN_NODE_CPU=4; fi
        ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 31:
if [ -z $SLAVE_NODE_MEMORY ]; then export SLAVE_NODE_MEMORY=4096; fi
        ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 32:
if [ -z $SLAVE_NODE_CPU ]; then export SLAVE_NODE_CPU=4; fi
        ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 284:
    ISO="`ls ${WORKSPACE}/build/iso/*.iso | head -n 1`"
         ^-- SC2006: Use $(..) instead of deprecated `..`
          ^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames.
             ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 372:
                echo wget -c ${ISO_URL} -O ${ISO_PATH}
                             ^-- SC2086: Double quote to prevent globbing and word splitting.
                                           ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 375:
                wget -c ${ISO_URL} -O ${ISO_PATH}
                        ^-- SC2086: Double quote to prevent globbing and word splitting.
                                      ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 407:
      mkdir -p $LOGS_DIR
               ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 419:
        if [ $(dos.py list | grep "^${ENV_NAME}\$") ]; then
             ^-- SC2046: Quote this to prevent word splitting.
             ^-- SC2143: Instead of [ -n $(foo | grep bar) ], use foo | grep -q bar .

In plugin_test/utils/jenkins/system_tests.sh line 440:
        echo python plugin_test/run_tests.py -q --nologcapture --with-xunit ${OPTS}
                                                                            ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 443:
        echo ${PYTHONPATH}
             ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 444:
        python plugin_test/run_tests.py -q --nologcapture --with-xunit ${OPTS}
                                                                       ^-- SC2086: Double quote to prevent globbing and word splitting.

In plugin_test/utils/jenkins/system_tests.sh line 484:
GetoptsVariables ${@}
                 ^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.

Tags: contrail
Yevgeniy (yshapovalov)
Changed in fuel-plugin-contrail:
status: New → In Progress
Yevgeniy (yshapovalov)
Changed in fuel-plugin-contrail:
status: In Progress → Fix Committed
Revision history for this message
Yevgeniy (yshapovalov) wrote :
Changed in fuel-plugin-contrail:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.