Allow running a specific functional test via CLI
Change-Id: I871f0e8c61420e062c2f79d5606cfcf895eeab97
This commit is contained in:
parent
81ae133bd5
commit
f5fa81313d
|
@ -462,6 +462,12 @@ class TestCLI(BaseCLITest):
|
|||
|
||||
self.assertDictContainsSubset(expected, res)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) > 1:
|
||||
test_name = sys.argv[1]
|
||||
else:
|
||||
test_name = None
|
||||
|
||||
with functional.mocked_server():
|
||||
unittest.main(verbosity=2)
|
||||
unittest.main(verbosity=2, defaultTest=test_name)
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -25,14 +25,14 @@ basepython = python2.7
|
|||
deps = {[testenv]deps}
|
||||
-r{toxinidir}/functest-requirements.txt
|
||||
commands =
|
||||
python -m ironic_inspector_client.test.functional
|
||||
python -m ironic_inspector_client.test.functional {posargs}
|
||||
|
||||
[testenv:functional-py3]
|
||||
basepython = python3
|
||||
deps = {[testenv]deps}
|
||||
-r{toxinidir}/functest-requirements.txt
|
||||
commands =
|
||||
python -m ironic_inspector_client.test.functional
|
||||
python -m ironic_inspector_client.test.functional {posargs}
|
||||
|
||||
[testenv:functional-py36]
|
||||
basepython = python3.6
|
||||
|
|
Loading…
Reference in New Issue