monasca-notification/tox.ini
Tomasz Trębski e1a9b9a96a Integrate with oslo.conf and oslo.log
Change upgrades the monasca-notification to leverage
the capabilities of both oslo.log and oslo.conf:

- configuration of logging separated from application settings
- ability to enforce data types for application settings
- ability to use oslo.config-generator capabilities
- automatic configuration parsing done by oslo.cfg

That change will bring it closer to the rest of monasca
components where such transition has happened already.
However, in the rest of monasca, oslo.cfg was partially
or fully implemented whereas monasca-notification has
been relying on YAML based configuration file.

Therefore backward compatybility for such format will
be kept for now.

Story: 2000959
Task: 4093
Task: 4092

Change-Id: Ia75c3b60d0fada854178f21ca5ccb9e6a880f37f
2017-10-20 09:32:11 +02:00

91 lines
2.1 KiB
INI

[tox]
envlist = py{27,35,py},pep8,cover
minversion = 2.7
skipsdist = True
[testenv]
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH=tests
CLIENT_NAME=monasca-notification
passenv =
*_proxy
*_PROXY
usedevelop = True
install_command =
{toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} --pre
whitelist_externals = bash
find
rm
deps = -r{toxinidir}/test-requirements.txt
.[jira_plugin]
commands =
find . -type f -name "*.pyc" -delete
rm -Rf .testrepository/times.dbm
[testenv:py27]
description = Runs unit test using Python2.7
basepython = python2.7
commands =
{[testenv]commands}
ostestr {posargs}
[testenv:py35]
description = Runs unit test using Python3.5
basepython = python3.5
commands =
{[testenv]commands}
ostestr {posargs}
[testenv:pypy]
description = Runs unit test using pypy
basepython = pypy
commands =
{[testenv]commands}
ostestr {posargs}
[testenv:cover]
commands =
{[testenv]commands}
coverage erase
python setup.py test --coverage --testr-args='{posargs}' --coverage-package-name=monasca_notification
coverage report
[testenv:debug]
commands =
oslo_debug_helper -t ./monasca_notification/tests {posargs}
[testenv:pep8]
commands =
{[testenv:flake8]commands}
{[testenv:bandit]commands}
[testenv:venv]
commands = {posargs}
[testenv:flake8]
commands =
flake8 monasca_notification
flake8 tests
[testenv:bandit]
commands =
bandit -r monasca_notification -n5 -x monasca_notification/tests
[testenv:genconfig]
description = Generates an example of monasca-notification configuration file
commands = oslo-config-generator --config-file={toxinidir}/config-generator/notification.conf
[flake8]
max-line-length = 120
# TODO: ignored checks should be enabled in the future
# H201 no 'except:' at least use 'except Exception:'
# H202: assertRaises Exception too broad
# H405 multi line docstring summary not separated with an empty line
ignore = F821,H201,H202,H405
exclude=.venv,.git,.tox,dist,*egg,build
[hacking]
import_exceptions =
six.moves