test: Allow to run a specific test
Previously heat-dashboard unit/integration tests always run the whole set of tests and there is no way to run a specific test. {posargs} mechanism of tox would help us. Change-Id: Ia37a2586a9207180c5f3ed85141b2916468f18b8
This commit is contained in:
parent
458e9b0519
commit
1fd73b753e
6
tox.ini
6
tox.ini
@ -19,7 +19,7 @@ deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/up
|
|||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
python manage.py test heat_dashboard.test --settings=heat_dashboard.test.settings --exclude-tag integration
|
python manage.py test {posargs:heat_dashboard.test} --settings=heat_dashboard.test.settings --exclude-tag integration
|
||||||
|
|
||||||
[testenv:integration]
|
[testenv:integration]
|
||||||
# Run integration tests only
|
# Run integration tests only
|
||||||
@ -29,7 +29,7 @@ setenv =
|
|||||||
INTEGRATION_TESTS=1
|
INTEGRATION_TESTS=1
|
||||||
SELENIUM_HEADLESS=1
|
SELENIUM_HEADLESS=1
|
||||||
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=heat_dashboard/test/integration/horizon.conf
|
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=heat_dashboard/test/integration/horizon.conf
|
||||||
commands = python manage.py test heat_dashboard.test.integration --settings=heat_dashboard.test.settings --tag integration
|
commands = python manage.py test {posargs:heat_dashboard.test.integration} --settings=heat_dashboard.test.settings --tag integration
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8 {posargs}
|
commands = flake8 {posargs}
|
||||||
@ -40,7 +40,7 @@ commands = {posargs}
|
|||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands =
|
commands =
|
||||||
coverage erase
|
coverage erase
|
||||||
coverage run --source=heat_dashboard {toxinidir}/manage.py test heat_dashboard.test.tests --settings=heat_dashboard.test.settings {posargs}
|
coverage run --source=heat_dashboard {toxinidir}/manage.py test {posargs:heat_dashboard.test.tests} --settings=heat_dashboard.test.settings
|
||||||
coverage xml
|
coverage xml
|
||||||
coverage html
|
coverage html
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user