
This adds better exception handling ang logging to _append_file_to_result helper in get_files. When reading arbitrary file data and attempting to encode to utf-8 this can cause UnicodeDecodeError to be raised. However, Armada will not skip over such files; it will raise an exception with appropriate details instead. Closes #195 Closes #196 Change-Id: Id7c32c17e351d1ffe042e3755c116c36b6380223
60 lines
1.3 KiB
INI
60 lines
1.3 KiB
INI
[tox]
|
|
skipsdist = True
|
|
envlist = py35, pep8, coverage, bandit
|
|
|
|
[testenv]
|
|
deps=
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
passenv=HTTP_PROXY HTTPS_PROXY http_proxy https_proxy NO_PROXY no_proxy
|
|
setenv=
|
|
VIRTUAL_ENV={envdir}
|
|
basepython = python3.5
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
whitelist_externals =
|
|
find
|
|
flake8
|
|
rm
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
python -V
|
|
{toxinidir}/tools/run-unit-tests.sh {posargs}
|
|
|
|
[testenv:docs]
|
|
commands =
|
|
rm -rf doc/build
|
|
python setup.py build_sphinx
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
oslo-config-generator --config-file=etc/armada/config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
commands =
|
|
oslopolicy-sample-generator --config-file=etc/armada/policy-generator.conf
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs}
|
|
|
|
[testenv:bandit]
|
|
commands =
|
|
bandit -r armada -x armada/tests -n 5
|
|
|
|
[testenv:coverage]
|
|
passenv=http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY
|
|
setenv=
|
|
VIRTUAL_ENV={envdir}
|
|
commands =
|
|
python -m pytest \
|
|
--cov-branch \
|
|
--cov-report term-missing:skip-covered \
|
|
--cov-config .coveragerc \
|
|
--cov=armada
|
|
|
|
[flake8]
|
|
filename = *.py
|
|
ignore = E722
|
|
exclude = .git,.tox,dist,*lib/python*,*egg,build,releasenotes,docs/*,hapi,venv
|