From 23a6eeedba05d585848b32aa9e3ba2ca91366e01 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Thu, 30 Jul 2015 06:49:03 +0200 Subject: [PATCH] tests: ensure gabbi live test fail This change ensures that the gabbi live test fail if service url is not present. Change-Id: Ic83467482555c01b3649a30f1575f745d872f5f9 --- aodh/tests/functional/gabbi/test_gabbi_live.py | 2 ++ tox.ini | 1 + 2 files changed, 3 insertions(+) diff --git a/aodh/tests/functional/gabbi/test_gabbi_live.py b/aodh/tests/functional/gabbi/test_gabbi_live.py index 020df28f2..af72a84de 100644 --- a/aodh/tests/functional/gabbi/test_gabbi_live.py +++ b/aodh/tests/functional/gabbi/test_gabbi_live.py @@ -44,3 +44,5 @@ def load_tests(loader, tests, pattern): host=parsed_url.hostname, port=port, prefix=prefix) + elif os.getenv('GABBI_LIVE_FAIL_IF_NO_TEST'): + raise RuntimeError('AODH_SERVICE_URL is not set') diff --git a/tox.ini b/tox.ini index fdd4a68df..20f71c5c8 100644 --- a/tox.ini +++ b/tox.ini @@ -36,6 +36,7 @@ commands = setenv = VIRTUAL_ENV={envdir} EVENTLET_NO_GREENDNS=yes OS_TEST_PATH=aodh/tests/functional/ + GABBI_LIVE_FAIL_IF_NO_TEST=1 passenv = AODH_* commands = bash -x {toxinidir}/run-functional-tests.sh "{posargs}"