Name: mos-integration-tests
Owner: Mirantis Inc.
Description: null
Created: 2015-12-04 14:33:39.0
Updated: 2016-11-14 16:43:21.0
Pushed: 2017-03-17 11:21:45.0
Homepage: null
Size: 4011
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repository contains automated tests for Mirantis OpenStack.
do apt-get install libpq-dev \
python-dev \
libffi-dev \
libvirt-dev
$ virtualenv --clear venv
$ source venv/bin/activate
$ pip install -U pip
$ pip install tox
To run tests you need to deploy some cloud with MOS, then install tox
and run on server:
$ tox -e <test group> -- -E <devops env name> -S <devops snapshot name>
IMPORTANT: some tests will fail, if they ran from root user.
To launch tests with py.test directly:
$ pip install -r requirements.txt
Next you can run tests:
$ py.test mos_tests/<path_to_tests> -E <devops env name> -S <devops snapshot name>
This arguments can be used with tox or with py.test directly. In first case all arguments should be passed after --
-s
don't capture stdout, stderr. This parameter required, if you want to use debugger like import pdb; pdb.set_trace()
-k <some filter>
filter tests to run by test name, class name, file name, etc.--collectonly
- show list of tests, with all filters, which py.test will execute. May be helpful to check that -k
parameter is passed correctly.-ra
print extended information about failed and skipped tests. May be helpful, if you want to know, why some tests was skipped-x
exit after first fail-I <fuel master ip>
If this parameter passed, and -S
is not passed - py.test will non do revert before tests. May be helpful during debugging or writing new tests.-v
be more verbose (show test name instead of dots)--help
- py.test help. Contains other possible argumentsSome times, during installing python requirements, you can see next error:
Traceback (most recent call last):
File "/home/sandriichenko/venv/bin/pip", line 11, in <module>
sys.exit(main())
File "/home/sandriichenko/venv/local/lib/python2.7/site-packages/pip/_init_.py", line 215, in main
locale.setlocale(locale.LC_ALL, '')
File "/home/sandriichenko/venv/lib/python2.7/locale.py", line 579, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
To fix it, execute next commands:
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
Before submitting new code, please, run tox -e py27-static_check
and tox -e py34-static_check
to avoid flake8 violations.
To build docs:
$ cd doc && make html