monasca-ui/tox.ini
Doug Hellmann b526e21436 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

monasca-ui specific changes:
- Unlike other projects, monasca-ui does not support python3 unit tests yet.
  python2.7 is used as basepython. This should be updated to python3 later.
- Bump the the minimum version of python-monascaclient to 1.8.0
  to pass test_client unit tests.
- nose-exclude needs to bumped to 0.5.0 to run all existing unit tests.

lower-constraints.txt is modified to match the latest horizon requirements
https://review.openstack.org/#/c/555491/:
- unit tests fails with Django 1.8. It passes with Django 1.11.
  Horizon Rocky bumped the Django min version to >=1.11, so it makes sense
  to bump the Django min version to 1.11.
- django-babel needs to bumped to 0.6.2 to support Django 1.11 and 2.0.

https://review.openstack.org/555402 allows us to bump lower requirements.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ifd967b598db259429cc83046ae88abaf3d50e081
Depends-On: https://review.openstack.org/555034
Depends-On: https://review.openstack.org/555402
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
2018-04-10 16:42:22 +00:00

60 lines
1.7 KiB
INI

[tox]
envlist = py27,pep8
minversion = 2.6
skipsdist = True
[testenv]
usedevelop = True
passenv = http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install {opts} {packages}
whitelist_externals =
/bin/bash
find
commands =
find . -type f -name "*.pyc" -delete
/bin/bash run_tests.sh -N {posargs}
[testenv:py27]
setenv =
DJANGO_SETTINGS_MODULE=monitoring.test.settings
[testenv:pep8]
commands = /bin/bash run_tests.sh -N --pep8
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands = /bin/bash run_tests.sh -N --coverage {posargs}
[flake8]
builtins = _
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*
# E127 continuation line over-indented for visual indent
# E128 continuation line under-indented for visual indent
# E501 line too long
# H102 Apache 2.0 license header not found
# H238 old style class declaration, use new style
# H301 one import per line
# H306 imports not in alphabetical order
# H405 multi line docstring summary not separated with an empty line
# H904 Wrap long lines in parentheses instead of a backslash
ignore = E127,E128,E501,H102,H238,H301,H306,H405,H904
[testenv:lower-constraints]
# TODO(someone) switch basepython to python3 as what most projects do
basepython = python2.7
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt