fuel-ccp-tests/fuel_ccp_tests/run_test.py
Dennis Dmitriev be41fbba5d Add markers to system tests
fuel_ccp_tests can be installed as a package:
pip install git+git://github.com/openstack/fuel-ccp-tests --upgrade

To run the test, use 'fuel_ccp_tests' CLI and pytest marks:

fuel_ccp_tests -k fuel_ccp_installer  # Run all the k8s install tests
fuel_ccp_tests -k ccp_cli_errexit_codes  # Run all errorcode tests
fuel_ccp_tests -k deploy_openstack  # Run ccp install test
fuel_ccp_tests -k horizon_component  # Run pre-commit test
                                     # for horizon

Change-Id: Ib5b1869264529661958840fced5b7c49e6f19647
2016-08-30 17:21:24 +00:00

25 lines
604 B
Python

#!/usr/bin/env python
import os
import sys
import pytest
import fuel_ccp_tests
def shell():
if len(sys.argv) > 1:
# Run py.test for fuel_ccp_tests module folder with specified options
testpaths = os.path.dirname(fuel_ccp_tests.__file__)
opts = ' '.join(sys.argv[1:])
addopts = '-vvv -s -p no:django -p no:ipdb --junit-xml=nosetests.xml'
return pytest.main('{testpaths} {addopts} {opts}'.format(
testpaths=testpaths, addopts=addopts, opts=opts))
else:
return pytest.main('--help')
if __name__ == '__main__':
sys.exit(shell())