Functional Tests and Gate stub

- Adds modifications to tox.ini to enable functional testing
- adds the functional sub directory to the tests folder
- adds .zuul file to enable the Gate to start functional testing.

Change-Id: Id40c0feba1741328027bd285e10aa8899b4a12b9
This commit is contained in:
david shaughnessy 2018-01-09 13:26:09 +00:00 committed by David Shaughnessy
parent d73e2bafa4
commit 61b187d768
7 changed files with 75 additions and 0 deletions

18
.zuul.yaml Normal file
View File

@ -0,0 +1,18 @@
- project:
name: openstack/neutron-classifier
check:
jobs:
- openstack-tox-functional:
required-projects:
- openstack/neutron
- openstack-tox-functional-py35:
required-projects:
- openstack/neutron
gate:
jobs:
- openstack-tox-functional:
required-projects:
- openstack/neutron
- openstack-tox-functional-py35:
required-projects:
- openstack/neutron

View File

@ -0,0 +1,4 @@
# Additional requirements for functional tests
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.

View File

@ -0,0 +1,7 @@
from neutron_classifier.tests import base
class PlaceholderTest(base.TestCase):
def test_noop(self):
pass

View File

@ -4,6 +4,7 @@ python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx>=1.6.2 # BSD sphinx>=1.6.2 # BSD
oslosphinx>=4.7.0 # Apache-2.0 oslosphinx>=4.7.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT testtools>=1.4.0 # MIT

8
tools/ostestr_compat_shim.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
# preserve old behavior of using an arg as a regex when '--' is not present
case $@ in
(*--*) ostestr $@;;
('') ostestr;;
(*) ostestr --regex "$@"
esac

37
tox.ini
View File

@ -22,6 +22,43 @@ commands =
# TODO(igordcard): enable pylint on a future patch # TODO(igordcard): enable pylint on a future patch
# pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_classifier} # pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_classifier}
[testenv:dsvm]
setenv = OS_FAIL_ON_MISSING_DEPS=1
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
[testenv:functional]
setenv = {[testenv]setenv}
OS_TEST_TIMEOUT=180
OS_TEST_PATH=./neutron_classifier/tests/functional
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
deps =
{[testenv]deps}
-r{toxinidir}/neutron_classifier/tests/functional/requirements.txt
commands =
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
[testenv:functional-py35]
basepython = python3.5
setenv = {[testenv]setenv}
OS_TEST_TIMEOUT=180
OS_TEST_PATH=./neutron_classifier/tests/functional
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
deps =
{[testenv]deps}
-r{toxinidir}/neutron_classifier/tests/functional/requirements.txt
commands =
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
[testenv:dsvm-functional]
basepython = python2.7
setenv = {[testenv:functional]setenv}
{[testenv:dsvm]setenv}
sitepackages=True
deps =
{[testenv:functional]deps}
commands =
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}