Merge "Run tests with PyMySQL on Python 3"

This commit is contained in:
Jenkins
2015-05-25 18:00:17 +00:00
committed by Gerrit Code Review
2 changed files with 38 additions and 1 deletions

25
test-requirements-py3.txt Normal file
View File

@@ -0,0 +1,25 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=0.10.0,<0.11
coverage>=3.6
discover
fixtures>=0.3.14
mock>=1.0
mox3>=0.7.0
PyMySQL>=0.6.2 # MIT License
psycopg2
python-barbicanclient>=3.0.1
python-ironicclient>=0.2.1
python-subunit>=0.0.18
requests-mock>=0.6.0 # Apache-2.0
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
oslosphinx>=2.5.0 # Apache-2.0
oslotest>=1.5.1 # Apache-2.0
testrepository>=0.0.18
testtools>=0.9.36,!=1.2.0
tempest-lib>=0.5.0
# vmwareapi driver specific dependencies
oslo.vmware>=0.11.1 # Apache-2.0

14
tox.ini
View File

@@ -1,6 +1,6 @@
[tox]
minversion = 1.6
envlist = py27,functional,pep8,pip-missing-reqs
envlist = py34,py27,functional,pep8,pip-missing-reqs
skipsdist = True
[testenv]
@@ -29,6 +29,18 @@ downloadcache = ~/cache/pip
commands =
flake8 {posargs}
[testenv:py34]
# NOTE(viktors): we must change default connection string for MySQL because
# we use a different DB connector (PyMySQL, not MySQLdb) in py3x
# env. So we should put new DB URLs in the env variable. This
# will allow to run tests, that require MySQL database,
# for example DB migration tests.
setenv =
{[testenv]setenv}
OS_TEST_DBAPI_ADMIN_CONNECTION=mysql+pymysql://openstack_citest:openstack_citest@localhost/;postgresql://openstack_citest:openstack_citest@localhost/postgres;sqlite://
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements-py3.txt
[testenv:functional]
usedevelop = True
install_command = pip install -U --force-reinstall {opts} {packages}