Added tox tempest environment

When running tox with tox -etempest, tox will install tempest
from a specific commit that the v2 tests are known to work well
with.  Then the tests will be run. This also puts a change in
pretty_tox.sh to control the concurrency level because the
tempest tests will fail when running in parallel.

Change-Id: I745293322149390f0e709165f34c144f5c439720
This commit is contained in:
Brandon Logan 2015-03-09 13:19:50 -05:00
parent 53ef6171c6
commit 06c4681ec6
5 changed files with 41 additions and 4 deletions

1
.gitignore vendored
View File

@ -21,6 +21,7 @@ run_tests.log
setuptools*.egg/
subunit.log
tempest.log
.testrepository
*.mo
*.sw?
*~

View File

@ -0,0 +1,6 @@
These tests are reliant on a specific version of tempest.
This version of tempest is pulled down through the tox
configuration. To run these tests you need to
have devstack running and execute:
tox -re tempest

View File

@ -1,11 +1,15 @@
[DEFAULT]
# Leaving this as a placeholder
verbose=false
debug=false
use_stderr=false
lock_path = /opt/stack/data/tempest
[identity]
# Replace these with values that represent your identity configuration
uri=http://localhost:9696/v2.0
uri_v3=http://localhost:9696/v3
auth_version=v3
uri=http://localhost:5000/v2.0
uri_v3=http://localhost:5000/v3
auth_version=v2
region=RegionOne
username=admin
@ -18,6 +22,17 @@ admin_tenant_name=admin
admin_password=password
admin_domain_name=Default
[service_available]
tuskar = False
neutron = True
heat = False
ceilometer = False
swift = False
cinder = False
nova = True
glance = True
horizon = False
[lbaas]
# These are not currently being pulled in.
# Need to implement CONF strategy for this.

View File

@ -1,6 +1,12 @@
#! /bin/sh
TESTRARGS=$1
#This is for supporting tempest tests in tox as the neutron-lbaas tempest tests fail when run in parallel
CONCURRENCY=${OS_TESTR_CONCURRENCY:-}
if [ -n "$CONCURRENCY" ]
then
CONCURRENCY="--concurrency=$CONCURRENCY"
fi
exec 3>&1
status=$(exec 4>&1 >&3; (python setup.py testr --slowest --testr-args="--subunit $TESTRARGS"; echo $? >&4 ) | $(dirname $0)/subunit-trace.py -f) && exit $status
status=$(exec 4>&1 >&3; (python setup.py testr --slowest --testr-args="--subunit $TESTRARGS $CONCURRENCY"; echo $? >&4 ) | $(dirname $0)/subunit-trace.py -f) && exit $status

View File

@ -88,3 +88,12 @@ commands =
[hacking]
import_exceptions = neutron.i18n
local-check-factory = neutron.hacking.checks.factory
[testenv:tempest]
deps =
{[testenv]deps}
-egit+https://git.openstack.org/openstack/tempest@1f88ecec48dd89cc101fdf30458ed177bd7f20ef#egg=tempest
setenv =
OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest
OS_TESTR_CONCURRENCY=1
TEMPEST_CONFIG_DIR={toxinidir}/neutron_lbaas/tests/tempest/etc