From a90d5f1b5b966eecc89b7ce89301ba8482529c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Tue, 9 Mar 2021 19:10:51 +0000 Subject: [PATCH] [CI] Run bashate ... and fix related issues. Change-Id: I3283545a8994c3895b9ccbe4006bec4b4cfc8c95 --- devstack/plugin.sh | 15 ++++++++------- tox.ini | 10 ++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index f45b580a..e66f40b7 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -64,7 +64,8 @@ function create_masakari_accounts { create_service_user "$USERNAME" "admin" - local masakari_service=$(get_or_create_service "masakari" \ + local masakari_service + masakari_service=$(get_or_create_service "masakari" \ "instance-ha" "OpenStack High Availability") if [ "$MASAKARI_USE_MOD_WSGI" == "False" ]; then get_or_create_endpoint $masakari_service \ @@ -129,9 +130,9 @@ function configure_masakari { # (Re)create masakari api conf file if needed if is_service_enabled masakari-api; then oslo-config-generator --namespace keystonemiddleware.auth_token \ - --namespace masakari \ - --namespace oslo.db \ - > $MASAKARI_CONF + --namespace masakari \ + --namespace oslo.db \ + > $MASAKARI_CONF # Set common configuration values (but only if they're defined) iniset $MASAKARI_CONF DEFAULT masakari_api_workers "$API_WORKERS" @@ -175,9 +176,9 @@ function configure_masakarimonitors { # (Re)create masakarimonitors api conf file if needed oslo-config-generator --namespace masakarimonitors.conf \ - --namespace oslo.log \ - --namespace oslo.middleware \ - > $MASAKARI_MONITORS_CONF + --namespace oslo.log \ + --namespace oslo.middleware \ + > $MASAKARI_MONITORS_CONF iniset $MASAKARI_MONITORS_CONF api auth_url "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_AUTH_HOST}/identity" iniset $MASAKARI_MONITORS_CONF api password "$SERVICE_PASSWORD" diff --git a/tox.ini b/tox.ini index 51a342d2..c609a1c4 100644 --- a/tox.ini +++ b/tox.ini @@ -33,10 +33,12 @@ commands = oslopolicy-sample-generator --config-file=etc/masakari/masakari-polic deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt + {[testenv:bashate]deps} commands = {[testenv:pep8]commands} {[testenv:doc8]commands} {[testenv:yamllint]commands} + {[testenv:bashate]commands} [testenv:pep8] deps = {[testenv:linters]deps} @@ -54,6 +56,14 @@ commands = deps = {[testenv:linters]deps} commands = yamllint -s . +[testenv:bashate] +skip_install = True +deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + bashate +commands = + bashate devstack/plugin.sh -v --ignore E006 --error E005,E042,E043 + [testenv:venv] commands = {posargs}