Mehdi Abaakouk 37c0ae18dd kafka separate unit/functionnal tests
The kafka functional tests don't use our setup framework but hardcode
the kafka url.

The kafka driver is broken and currently try to be loaded with other
driver tests (and break py3 gate job).

This change remove the hardcoded stuff and uses the normal functional
tests setup to check kafka.

This avoids kafka tests to be ran on other driver tests job.

It also creates the tox target for functional tests and use
pifpaf to setup kafka.

As today, the functional test suite doesn't work all.

Change-Id: Ie6af35321905a04b38e549bf7268dd40543d9e3a
2016-12-07 18:39:36 +01:00

133 lines
4.5 KiB
INI

[tox]
minversion = 2.0
envlist = py35,py34,py27,pep8,bandit
[testenv]
setenv =
VIRTUAL_ENV={envdir}
BRANCH_NAME=master
CLIENT_NAME=oslo.messaging
passenv = OS_*
ZUUL_CACHE_DIR
REQUIREMENTS_PIP_LOCATION
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:pep8]
commands = flake8
deps = hacking<0.11,>=0.10.0
[testenv:cover]
commands =
python setup.py test --coverage --coverage-package-name=oslo_messaging --testr-args='{posargs}'
[testenv:venv]
commands = {posargs}
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:py27-func-rabbit]
setenv =
{[testenv]setenv}
TRANSPORT_DRIVER=rabbit
commands = pifpaf run rabbitmq -- python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py34-func-rabbit]
setenv =
{[testenv]setenv}
TRANSPORT_DRIVER=rabbit
basepython = python3.4
commands = pifpaf run rabbitmq -- python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py35-func-rabbit]
setenv =
{[testenv]setenv}
TRANSPORT_DRIVER=rabbit
basepython = python3.5
commands = pifpaf run rabbitmq -- python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-pika]
setenv =
{[testenv]setenv}
TRANSPORT_DRIVER=pika
commands = pifpaf run rabbitmq -- python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-kafka]
setenv =
{[testenv]setenv}
TRANSPORT_DRIVER=kafka
commands = {toxinidir}/setup-test-env-kafka.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-amqp1]
setenv =
{[testenv]setenv}
TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:65123//
AMQP1_BACKEND=qpidd
ENVNAME={envname}
WORKDIR={toxworkdir}
# NOTE(kgiusti): This gate job runs on Centos 7 for now.
commands = {toxinidir}/setup-test-env-amqp1.sh python setup.py testr --slowest --testr-args='oslo_messaging.tests.functional'
[testenv:py34-func-amqp1]
basepython = python3.4
setenv =
{[testenv]setenv}
TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:65123//
AMQP1_BACKEND=qpidd
ENVNAME={envname}
WORKDIR={toxworkdir}
# NOTE(kgiusti): This gate job runs on Centos 7 for now.
commands = {toxinidir}/setup-test-env-amqp1.sh python setup.py testr --slowest --testr-args='oslo_messaging.tests.functional'
[testenv:py35-func-amqp1]
basepython = python3.5
setenv =
{[testenv]setenv}
TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:65123//
AMQP1_BACKEND=qpidd
ENVNAME={envname}
WORKDIR={toxworkdir}
# NOTE(kgiusti): This gate job runs on Centos 7 for now.
commands = {toxinidir}/setup-test-env-amqp1.sh python setup.py testr --slowest --testr-args='oslo_messaging.tests.functional'
[testenv:py27-func-zeromq]
commands = {toxinidir}/setup-test-env-zmq.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py34-func-zeromq]
basepython = python3.4
commands = {toxinidir}/setup-test-env-zmq.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-zeromq-proxy]
commands = {toxinidir}/setup-test-env-zmq-proxy.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-zeromq-pub-sub]
commands = {toxinidir}/setup-test-env-zmq-pub-sub.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r oslo_messaging -x tests -n5
[flake8]
show-source = True
ignore = H405
exclude = .tox,dist,doc,*.egg,build,__init__.py
[hacking]
import_exceptions =
oslo_messaging._i18n
six.moves
local-check-factory = oslo_messaging.hacking.checks.factory
[testenv:pip-missing-reqs]
# do not install test-requirements as that will pollute the virtualenv for
# determining missing packages
# this also means that pip-missing-reqs must be installed separately, outside
# of the requirements.txt files
deps = pip_missing_reqs
commands = pip-missing-reqs -d --ignore-module=oslo_messaging* --ignore-file=oslo_messaging/tests/* --ignore-file=tests/ oslo_messaging
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html