tox: build all needed functional targets + fix compat with Gabbi >= 1.22 + fix raw type

Fix JSON SQL type to be Text, like it's actually in the old Ceilometer
migration script.

Change-Id: I647254d7b0e8f3c3983354a18e049ea633565187
This commit is contained in:
Julien Danjou 2016-06-23 13:26:44 +02:00
parent 6b6e4afa8e
commit d40c2a2867
3 changed files with 21 additions and 5 deletions

View File

@ -6,4 +6,4 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
test_id_option=--load-list $IDFILE test_id_option=--load-list $IDFILE
test_list_option=--list test_list_option=--list
# NOTE(chdent): Only used/matches on gabbi-related tests. # NOTE(chdent): Only used/matches on gabbi-related tests.
group_regex=(gabbi\.driver\.test_gabbi_(?:prefix_|)[^_]+)_ group_regex=(gabbi\.(suitemaker|driver)\.test_gabbi_(?:prefix_|)[^_]+)_

View File

@ -16,6 +16,7 @@ SQLAlchemy models for Panko data.
import json import json
import six import six
import sqlalchemy
from sqlalchemy import Column, Integer, String, ForeignKey, Index from sqlalchemy import Column, Integer, String, ForeignKey, Index
from sqlalchemy import Float, DateTime from sqlalchemy import Float, DateTime
from sqlalchemy.dialects.mysql import DECIMAL from sqlalchemy.dialects.mysql import DECIMAL
@ -30,7 +31,7 @@ from panko import utils
class JSONEncodedDict(TypeDecorator): class JSONEncodedDict(TypeDecorator):
"""Represents an immutable structure as a json-encoded string.""" """Represents an immutable structure as a json-encoded string."""
impl = String impl = sqlalchemy.Text
@staticmethod @staticmethod
def process_bind_param(value, dialect): def process_bind_param(value, dialect):

21
tox.ini
View File

@ -16,15 +16,30 @@ commands =
oslo-config-generator --config-file=etc/panko/panko-config-generator.conf oslo-config-generator --config-file=etc/panko/panko-config-generator.conf
whitelist_externals = bash whitelist_externals = bash
[testenv:py-mongodb] [testenv:py27-mongodb]
setenv = OS_TEST_PATH=panko/tests/functional/ setenv = OS_TEST_PATH=panko/tests/functional/
commands = pifpaf run mongodb {toxinidir}/tools/pretty_tox.sh "{posargs}" commands = pifpaf run mongodb {toxinidir}/tools/pretty_tox.sh "{posargs}"
[testenv:py-mysql] [testenv:py34-mongodb]
basepython = python3.4
setenv = OS_TEST_PATH=panko/tests/functional/
commands = pifpaf run mongodb {toxinidir}/tools/pretty_tox.sh "{posargs}"
[testenv:py27-mysql]
setenv = OS_TEST_PATH=panko/tests/functional/ setenv = OS_TEST_PATH=panko/tests/functional/
commands = pifpaf run mysql {toxinidir}/tools/pretty_tox.sh "{posargs}" commands = pifpaf run mysql {toxinidir}/tools/pretty_tox.sh "{posargs}"
[testenv:py-pgsql] [testenv:py34-mysql]
basepython = python3.4
setenv = OS_TEST_PATH=panko/tests/functional/
commands = pifpaf run mysql {toxinidir}/tools/pretty_tox.sh "{posargs}"
[testenv:py27-postgresql]
setenv = OS_TEST_PATH=panko/tests/functional/
commands = pifpaf run postgresql {toxinidir}/tools/pretty_tox.sh "{posargs}"
[testenv:py34-postgresql]
basepython = python3.4
setenv = OS_TEST_PATH=panko/tests/functional/ setenv = OS_TEST_PATH=panko/tests/functional/
commands = pifpaf run postgresql {toxinidir}/tools/pretty_tox.sh "{posargs}" commands = pifpaf run postgresql {toxinidir}/tools/pretty_tox.sh "{posargs}"