Run unit tests against MySQL

- Creates a new tox environment for testing against mysql
- Adds a script set-test-env-mysql.sh to set up mysql
- Adds a new file `functions.sh` for common shell functions
- Creates a new DB manager for tests
- Adds a new scenario for mysql in the MixinTestsWithBackendScenarios

Related to blueprint sql-unit-tests-on-real-backend
Co-Authored-By: Ala Rezmerita <ala.rezmerita@cloudwatt.com>

Change-Id: I2c7378c79b1a0bffae5b2489b04c60e509f62f85
This commit is contained in:
Joe H. Rahme
2014-08-29 13:33:30 +02:00
parent 3d480e11b9
commit 1278d067ef
5 changed files with 114 additions and 31 deletions

View File

@@ -1,7 +1,7 @@
[tox]
minversion = 1.6
skipsdist = True
envlist = py26,py27,py33,pep8
envlist = py26,py27,py27-mysql,py33,pep8
[testenv]
deps = -r{toxinidir}/requirements.txt
@@ -12,10 +12,14 @@ setenv = VIRTUAL_ENV={envdir}
EVENTLET_NO_GREENDNS=yes
PYTHONHASHSEED=0
commands =
bash -x {toxinidir}/setup-test-env.sh python setup.py testr --slowest --testr-args="{posargs}"
bash -x {toxinidir}/setup-test-env-mongodb.sh python setup.py testr --slowest --testr-args="{posargs}"
downloadcache = {toxworkdir}/_download
whitelist_externals = bash
[testenv:py27-mysql]
commands =
bash -x {toxinidir}/setup-test-env-mysql.sh python setup.py testr --slowest --testr-args="{posargs}"
[testenv:py33]
deps = -r{toxinidir}/requirements-py3.txt
-r{toxinidir}/test-requirements-py3.txt