[CI] Run bashate

... and fix related issues.

Change-Id: I3283545a8994c3895b9ccbe4006bec4b4cfc8c95
This commit is contained in:
Radosław Piliszek 2021-03-09 19:10:51 +00:00
parent 3128ef748f
commit a90d5f1b5b
2 changed files with 18 additions and 7 deletions

View File

@ -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"

10
tox.ini
View File

@ -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}