octavia-dashboard/tox.ini
Dirk Mueller ed325793c9 Add Constraints support
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove neutron-lbaas-dashboard.

Change-Id: Id0a31c878f39355bcb8b2e4b67b0c17b161c8603
2016-12-20 14:35:05 +11:00

67 lines
1.7 KiB
INI

[tox]
minversion = 1.6
envlist = py27,pep8,eslint,karma
skipsdist = True
[testenv]
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}
setenv =
VIRTUAL_ENV={envdir}
NOSE_WITH_OPENSTACK=1
NOSE_OPENSTACK_COLOR=1
NOSE_OPENSTACK_RED=0.05
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
CLIENT_NAME=neutron-lbaas-dashboard
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = /usr/bin/npm
/bin/bash
commands = python manage.py test
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
[testenv:py27integration]
basepython = python2.7
setenv =
{[testenv]setenv}
INTEGRATION_TESTS=1
SELENIUM_HEADLESS=1
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=neutron_lbaas_dashboard/tests/integration_tests/horizon.conf
DJANGO_SETTINGS_MODULE=neutron_lbaas_dashboard.tests.settings
commands = nosetests neutron_lbaas_dashboard/tests/integration_tests/tests {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:eslint]
# npm must be installed on the system, for example
# sudo apt-get install npm
commands = npm install
npm run lint
[testenv:karma]
# npm must be installed on the system, for example
# sudo apt-get install npm
commands = npm install
npm test
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build