From 1c260cbd69b7e0e34c01dae57c19ce713bbf3277 Mon Sep 17 00:00:00 2001 From: Dileep Ranganathan Date: Sat, 10 Feb 2018 12:00:18 -0800 Subject: Unit test for RootController and V1Controller Addedd unit tests for RootController and V1Controller Updated tox.ini to support coverage Change-Id: I3adf9d2268776382ff1f067857947af9718c9ac8 Issue-ID: OPTFRA-68 Signed-off-by: Dileep Ranganathan --- conductor/tox.ini | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'conductor/tox.ini') diff --git a/conductor/tox.ini b/conductor/tox.ini index 498770f..99af8b8 100644 --- a/conductor/tox.ini +++ b/conductor/tox.ini @@ -15,6 +15,7 @@ commands = {toxinidir}/tools/pretty_tox.sh "{posargs}" oslo-config-generator --config-file=etc/conductor/conductor-config-generator.conf whitelist_externals = bash + find [testenv:functional] setenv = VIRTUAL_ENV={envdir} @@ -24,9 +25,18 @@ commands = bash -x {toxinidir}/run-functional-tests.sh "{posargs}" [testenv:cover] -setenv = OS_TEST_PATH=conductor/tests +setenv = VIRTUAL_ENV={envdir} + LANGUAGE=en_US + OS_TEST_PATH=conductor/tests/unit + PYTHON=coverage run --source conductor --omit='*tests*' --parallel-mode commands = - python setup.py testr --slowest --coverage --testr-args='^(?!conductor_integrationtests){posargs}' + coverage erase + find . -type f -name "*.pyc" -delete + {toxinidir}/tools/pretty_tox.sh "{posargs}" + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report [testenv:pep8] deps = hacking<0.12,>=0.11.0 -- cgit 1.2.3-korg