Merge "Add a gate-specific tox env for functional tests"
This commit is contained in:
commit
eac1dde520
28
TESTING.rst
28
TESTING.rst
@ -4,16 +4,16 @@ Testing Neutron
|
|||||||
Overview
|
Overview
|
||||||
--------
|
--------
|
||||||
|
|
||||||
The unit tests are meant to cover as much code as possible and should
|
The unit tests (neutron/test/unit/) are meant to cover as much code as
|
||||||
be executed without the service running. They are designed to test
|
possible and should be executed without the service running. They are
|
||||||
the various pieces of the neutron tree to make sure any new changes
|
designed to test the various pieces of the neutron tree to make sure
|
||||||
don't break existing functionality.
|
any new changes don't break existing functionality.
|
||||||
|
|
||||||
The functional tests are intended to validate actual system
|
The functional tests (neutron/tests/functional/) are intended to
|
||||||
interaction. Mocks should be used sparingly, if at all. Care
|
validate actual system interaction. Mocks should be used sparingly,
|
||||||
should be taken to ensure that existing system resources are not
|
if at all. Care should be taken to ensure that existing system
|
||||||
modified and that resources created in tests are properly cleaned
|
resources are not modified and that resources created in tests are
|
||||||
up.
|
properly cleaned up.
|
||||||
|
|
||||||
Development process
|
Development process
|
||||||
-------------------
|
-------------------
|
||||||
@ -100,6 +100,16 @@ Neutron source code::
|
|||||||
|
|
||||||
tox
|
tox
|
||||||
|
|
||||||
|
To run functional tests that do not require sudo privileges or
|
||||||
|
specific-system dependencies::
|
||||||
|
|
||||||
|
tox -e functional
|
||||||
|
|
||||||
|
To run all the functional tests in an environment that has been configured
|
||||||
|
by devstack to support sudo and system-specific dependencies::
|
||||||
|
|
||||||
|
tox -e dsvm-functional
|
||||||
|
|
||||||
For more information on the standard Tox-based test infrastructure used by
|
For more information on the standard Tox-based test infrastructure used by
|
||||||
OpenStack and how to do some common test/debugging procedures with Testr,
|
OpenStack and how to do some common test/debugging procedures with Testr,
|
||||||
see this wiki page:
|
see this wiki page:
|
||||||
|
8
tox.ini
8
tox.ini
@ -17,6 +17,14 @@ setenv = OS_TEST_PATH=./neutron/tests/functional
|
|||||||
commands =
|
commands =
|
||||||
python setup.py testr --slowest --testr-args='{posargs}'
|
python setup.py testr --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
|
[testenv:dsvm-functional]
|
||||||
|
setenv = OS_TEST_PATH=./neutron/tests/functional
|
||||||
|
OS_SUDO_TESTING=1
|
||||||
|
OS_ROOTWRAP_CMD=sudo /usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
||||||
|
OS_FAIL_ON_MISSING_DEPS=1
|
||||||
|
commands =
|
||||||
|
python setup.py testr --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
[tox:jenkins]
|
[tox:jenkins]
|
||||||
sitepackages = True
|
sitepackages = True
|
||||||
downloadcache = ~/cache/pip
|
downloadcache = ~/cache/pip
|
||||||
|
Loading…
Reference in New Issue
Block a user