From 06c4681ec68d29991a4e49478be0d15d9e7b4138 Mon Sep 17 00:00:00 2001 From: Brandon Logan Date: Mon, 9 Mar 2015 13:19:50 -0500 Subject: [PATCH] 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 --- .gitignore | 1 + neutron_lbaas/tests/tempest/README | 6 ++++++ .../etc/{dev_tempest.conf => tempest.conf} | 21 ++++++++++++++++--- tools/pretty_tox.sh | 8 ++++++- tox.ini | 9 ++++++++ 5 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 neutron_lbaas/tests/tempest/README rename neutron_lbaas/tests/tempest/etc/{dev_tempest.conf => tempest.conf} (61%) diff --git a/.gitignore b/.gitignore index d88b848cb..5d4e68cbd 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ run_tests.log setuptools*.egg/ subunit.log tempest.log +.testrepository *.mo *.sw? *~ diff --git a/neutron_lbaas/tests/tempest/README b/neutron_lbaas/tests/tempest/README new file mode 100644 index 000000000..5e3981ffa --- /dev/null +++ b/neutron_lbaas/tests/tempest/README @@ -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 diff --git a/neutron_lbaas/tests/tempest/etc/dev_tempest.conf b/neutron_lbaas/tests/tempest/etc/tempest.conf similarity index 61% rename from neutron_lbaas/tests/tempest/etc/dev_tempest.conf rename to neutron_lbaas/tests/tempest/etc/tempest.conf index 23ea27042..75df55839 100644 --- a/neutron_lbaas/tests/tempest/etc/dev_tempest.conf +++ b/neutron_lbaas/tests/tempest/etc/tempest.conf @@ -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. diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh index 3ed73c196..4ea4cae33 100755 --- a/tools/pretty_tox.sh +++ b/tools/pretty_tox.sh @@ -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 diff --git a/tox.ini b/tox.ini index 2b76ad89a..0f4cccb4f 100644 --- a/tox.ini +++ b/tox.ini @@ -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