-
Notifications
You must be signed in to change notification settings - Fork 16
Develop CCDB
Dmitry Romanov edited this page Aug 4, 2017
·
11 revisions
Unit tests look for two environment variables:
-
CCDB_TEST_MYSQL_CONNECTION
if not foundmysql://[email protected]:3306/test_ccdb
is used -
CCDB_TEST_SQLITE_CONNECTION
if not foundsqlite:///$CCDB_HOME/sql/ccdb.sqlite
is used
It is assumed that for unit tests on MySQL database, the schema with name ccdb_test
and a user with name
ccdb_user
are used.
To create a user
mysql -u root -p -e "CREATE USER ccdb_user;"
To give a permission for the user
mysql -u root -p -e "GRANT ALL PRIVILEGES ON ccdb_test.* TO 'ccdb_user'@'localhost';"
There is a helpful script that allows to re/create the test database contents
> python $CCDB_HOME/python/tests/helper.py --rmysql