Running PostgreSQL and Mysql Unit tests in Keystone

We don’t include the postgres or Mysql drivers inside the virtual env for Keystone, so you need to explicitly install them in order to run the unit tests.


For Postgresql:

sudo yum install postgresql-devel
. .venv/bin/activate
pip install psycopg2

For MySQL

sudo yum install mysql-devel
. .venv/bin/activate
pip install MySQL-python

Now to run the unit tests, uncomment the driver line in tests/backend_sql.conf and run

./run_tests.sh -x test_sql_upgrade

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.