fuel-ostf/tox.ini
Tatyana Leontovich 003272dc29 Update tox.ini to skip dtabase creation steps
after https://github.com/openstack-infra/project-config/
commit/7334ceb347329ccbc04dc6bff536e88e12783a86 we do not need to
create db, user, role.

Also add usage of CUSTOM_OSTF_CONFIG env variable, to pass
correctly dbpath tp fuel_plugin.config.py

Closes-Bug: #1554086

Change-Id: Ic2881e1cb17693ab616044029325a601d2b04e2c
2016-03-07 16:59:28 +02:00

53 lines
1.6 KiB
INI

# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
minversion = 1.6
envlist = py27,pep8
skipsdist = True
[testenv]
usedevelop = True
whitelist_externals = bash
setenv = VIRTUAL_ENV={envdir}
CUSTOM_OSTF_CONFIG={toxinidir}/etc/tools/ostf_ci.conf
OSTF_LOGS={toxinidir}/ostf
OSTF_DB=openstack_citest
OSTF_DB_USER=openstack_citest
OSTF_DB_PW=openstack_citest
OSTF_DB_ROOT=postgres
OSTF_DB_ROOTPW=insecure_slave
OSTF_DB_ROOTPGPASS={toxinidir}/pgpass
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY CUSTOM_OSTF_CONFIG
deps = -r{toxinidir}/test-requirements.txt
commands =
/bin/bash "{toxinidir}/etc/tools/prepare_settings.sh"
/bin/bash "{toxinidir}/etc/tools/prepare_database.sh"
ostf-server --config-file {toxinidir}/etc/tools/ostf_ci.conf --after-initialization-environment-hook
nosetests {posargs:fuel_plugin/testing/tests/unit}
nosetests {posargs:fuel_plugin/testing/tests/integration}
[testenv:cover]
setenv = NOSE_WITH_COVERAGE=1
[testenv:venv]
deps = -r{toxinidir}/requirements.txt
commands = {posargs:}
[testenv:pep8]
deps = hacking==0.7
usedevelop = False
commands =
flake8 {posargs}
[flake8]
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs
show-pep8 = True
show-source = True
count = True
[hacking]
import_exceptions = testtools.matchers