Mirantis/mos-integration-tests

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Introduction

This repository contains automated tests for Mirantis OpenStack.

Packages requirements
do apt-get install libpq-dev \
python-dev \
libffi-dev \
libvirt-dev
Python requirements
$ virtualenv --clear venv
$ source venv/bin/activate
$ pip install -U pip
$ pip install tox
Running tests with 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.

Available test groups
Running with py.test directly

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>
Py.test arguments

This arguments can be used with tox or with py.test directly. In first case all arguments should be passed after --

Troubleshooting

Some 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
Recommendations

Before submitting new code, please, run tox -e py27-static_check and tox -e py34-static_check to avoid flake8 violations.

Documentation

To build docs:

$ cd doc && make html

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.