Integration tests: Allow to run a specific test from tox

Previously the path of the integration tests was specified explicitly
in tox.ini and we cannot run a specific test from tox.
{posargs} existed in the previous command line, but it can be used
only to specify extra options and we cannot change the test path,
so the whole integration tests are always run.
It can be solved by passing the integration test path as
the default value of {posargs}.

The most possible case where we would like to change the test command
is to run a specific set of tests instead of the whole tests,
so I believe this solution would work.

Change-Id: Ifa478a360a8af8b3d959de7ec632eedef484391d
This commit is contained in:
Akihiro Motoki 2022-02-16 19:08:58 +09:00
parent 18545ca921
commit 115326769f

View File

@ -113,7 +113,7 @@ setenv =
SELENIUM_HEADLESS=False SELENIUM_HEADLESS=False
commands = commands =
oslo-config-generator --namespace openstack_dashboard_integration_tests oslo-config-generator --namespace openstack_dashboard_integration_tests
pytest {toxinidir}/openstack_dashboard/test/integration_tests --ds=openstack_dashboard.test.settings -v --junitxml="{toxinidir}/test_reports/integration_test_results.xml" --html="{toxinidir}/test_reports/integration_test_results.html" --self-contained-html {posargs} pytest --ds=openstack_dashboard.test.settings -v --junitxml="{toxinidir}/test_reports/integration_test_results.xml" --html="{toxinidir}/test_reports/integration_test_results.html" --self-contained-html {posargs:{toxinidir}/openstack_dashboard/test/integration_tests}
[testenv:npm] [testenv:npm]
passenv = passenv =