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 *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>