deb-gnocchi/tox.ini
Mehdi Abaakouk eb1d64782a storage: Add redis driver
This change adds a redis driver and uses it by default in devstack.
Because reading/writting from/to disks is too slow in our testing
environment.

Change-Id: If617260a9d8e38dc9ba9311c832be333346dd41e
2017-03-07 07:55:05 +01:00

155 lines
5.4 KiB
INI

[tox]
minversion = 1.8
envlist = py{35,27}-{postgresql,mysql}{,-file,-swift,-ceph,-s3},pep8,bashate,py35-postgresql-file-upgrade-from-2.2,py27-mysql-ceph-upgrade-from-2.2
[testenv]
usedevelop = True
sitepackages = False
passenv = LANG OS_DEBUG OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE GNOCCHI_TEST_* AWS_*
setenv =
GNOCCHI_TEST_STORAGE_DRIVER=file
GNOCCHI_TEST_INDEXER_DRIVER=postgresql
GNOCCHI_TEST_STORAGE_DRIVERS=file swift ceph s3 redis
GNOCCHI_TEST_INDEXER_DRIVERS=postgresql mysql
file: GNOCCHI_TEST_STORAGE_DRIVERS=file
swift: GNOCCHI_TEST_STORAGE_DRIVERS=swift
ceph: GNOCCHI_TEST_STORAGE_DRIVERS=ceph
redis: GNOCCHI_TEST_STORAGE_DRIVERS=redis
s3: GNOCCHI_TEST_STORAGE_DRIVERS=s3
postgresql: GNOCCHI_TEST_INDEXER_DRIVERS=postgresql
mysql: GNOCCHI_TEST_INDEXER_DRIVERS=mysql
GNOCCHI_STORAGE_DEPS=file,swift,s3,ceph,ceph_recommended_lib,redis
ceph: GNOCCHI_STORAGE_DEPS=ceph,ceph_recommended_lib
swift: GNOCCHI_STORAGE_DEPS=swift
file: GNOCCHI_STORAGE_DEPS=file
redis: GNOCCHI_STORAGE_DEPS=redis
s3: GNOCCHI_STORAGE_DEPS=s3
deps = .[test]
postgresql: .[postgresql,{env:GNOCCHI_STORAGE_DEPS}]
mysql: .[mysql,{env:GNOCCHI_STORAGE_DEPS}]
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
commands =
doc8 --ignore-path doc/source/rest.rst doc/source
gnocchi-config-generator
{toxinidir}/run-tests.sh {posargs}
[testenv:py35-postgresql-file-upgrade-from-3.0]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
# FIXME(sileht): We set alembic version until next Gnocchi 3.0 is released
envdir = upgrade
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,postgresql,file
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=3.0,<3.1
alembic<0.9.0
pifpaf>=0.13
gnocchiclient>=2.8.0
commands = pifpaf --env-prefix INDEXER run postgresql {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:py27-mysql-ceph-upgrade-from-3.0]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
# FIXME(sileht): We set alembic version until next Gnocchi 3.0 is released
envdir = upgrade
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=3.0,<3.1
alembic<0.9.0
gnocchiclient>=2.8.0
pifpaf>=0.13
commands = pifpaf --env-prefix INDEXER run mysql -- pifpaf --env-prefix STORAGE run ceph {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:py35-postgresql-file-upgrade-from-2.2]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
envdir = upgrade
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,postgresql,file
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=2.2,<2.3
pifpaf>=0.13
gnocchiclient>=2.8.0
commands = pifpaf --env-prefix INDEXER run postgresql {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:py27-mysql-ceph-upgrade-from-2.2]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
envdir = upgrade
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=2.2,<2.3
gnocchiclient>=2.8.0
pifpaf>=0.13
cradox
# cradox is required because 2.2 extra names are incorrect
commands = pifpaf --env-prefix INDEXER run mysql -- pifpaf --env-prefix STORAGE run ceph {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:bashate]
deps = bashate
commands = bashate -v devstack/plugin.sh devstack/gate/gate_hook.sh devstack/gate/post_test_hook.sh
whitelist_externals = bash
[testenv:pep8]
deps = hacking>=0.12,<0.13
commands = flake8
[testenv:py27-gate]
setenv = OS_TEST_PATH=gnocchi/tests/functional_live
GABBI_LIVE=1
passenv = {[testenv]passenv} GNOCCHI_SERVICE*
sitepackages = True
basepython = python2.7
commands = {toxinidir}/tools/pretty_tox.sh '{posargs}'
# This target provides a shortcut to running just the gabbi tests.
[testenv:py27-gabbi]
deps = .[test,postgresql,file]
setenv = OS_TEST_PATH=gnocchi/tests/functional
basepython = python2.7
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- {toxinidir}/tools/pretty_tox.sh '{posargs}'
[testenv:py27-cover]
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py testr --coverage --testr-args="{posargs}"
[testenv:venv]
# This is used by the doc job on the gate
deps = {[testenv:docs]deps}
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- {posargs}
[flake8]
exclude = .tox,.eggs,doc
show-source = true
enable-extensions = H904
[testenv:genconfig]
deps = .[mysql,postgresql,test,file,ceph,swift,s3]
commands = gnocchi-config-generator
[testenv:docs]
# This does not work, see: https://bitbucket.org/hpk42/tox/issues/302
# deps = {[testenv]deps}
# .[doc]
deps = .[test,postgresql,file,doc]
setenv = GNOCCHI_TEST_STORAGE_DRIVER=file
GNOCCHI_TEST_INDEXER_DRIVER=postgresql
commands = doc8 --ignore-path doc/source/rest.rst doc/source
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py build_sphinx
[testenv:docs-gnocchi.xyz]
deps = .[file,postgresql,test,doc]
sphinx_rtd_theme
sphinxcontrib-versioning
# for 2.x doc
pytimeparse
retrying
commands =
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- sphinx-versioning build doc/source doc/build/html -- -D html_theme=sphinx_rtd_theme