#!/bin/sh

set -e

# Disable the mysql test suite for now, we only run the postgres test suite
# The limitation is that both database engines run (as one would expect) as
# different users and therefore local identification via the uid works either
# for one or the other, so the case hereunder is executed against postgres with
# the postgres user and in that execution the mysql test cases could not be run
# without further changes to the test_databases.ini file and to the default
# mysql setup.
sed -i '/mysql/d' test_databases.ini

# create private PG cluster for testing
pg_virtualenv -i '-Upostgres -Atrust' <<EOF
set -ex
export PYTHONPATH=$(pwd)/debian/tests
psql -Upostgres -c 'create database yoyo_test;'
pytest-3 yoyo/tests
EOF
