deckhand/deckhand/db
Felipe Monteiro b0c2f1c4e2 Allow unit tests to be run against in-memory sqlite
Recently JSONB replaced a back-end agnostic data type
for the "data" column in the Document model. This
made it necessary to drop support for running Deckhand
unit tests with any other database store.

However, this arragenement is undesirable as a user
shouldn't need to have postgresql installed just to
kick off unit tests.

So, this PS re-adds support for running unit tests
via an in-memory sqlite database.

To run unit tests with sqlite:

    tox -e py35

Unit tests still run against postgresql via:

    tox -e py35-postgresql

Both jobs are executed in CICD already.

This PS also updates the remaining DB columns to use JSONB if
postgresql is enabled; else fallback columns are used for testing
with sqlite. This is a necessary change to make the column data
types consistent.

Change-Id: I951f2f04fd013d635bb7653a238ff1eb3725b5e1
2018-02-12 22:10:29 -05:00
..
sqlalchemy Allow unit tests to be run against in-memory sqlite 2018-02-12 22:10:29 -05:00
__init__.py Initial DB API models implementation. 2017-07-17 20:47:56 +01:00