Skip to content

Development

Dmitry Romanov edited this page Apr 21, 2018 · 5 revisions

1. Establishing unit tests

  1. Create MySQL database for the test purposes

    mysql -u root -p
    CREATE SCHEMA test_rcdb;
    CREATE USER test_rcdb;
    GRANT ALL PRIVILEGES ON test_rcdb.* TO 'test_rcdb'@'localhost';
  2. Set RCDB_MYSQL_TEST_CONNECTION environment variable

    export RCDB_MYSQL_TEST_CONNECTION="mysql://test_rcdb@localhost/test_rcdb"
    
  3. run create_test_database.py

    python $RCDB_HOME/python/tests/create_test_database.py $RCDB_MYSQL_TEST_CONNECTION
  4. Run test_all_rcdb

Database structure explained

RCDB sql schema

The database schema is pretty simple. One could divide tables in four conceptual groups:

  1. runs table. That is where a run numbers are stored.
  2. File storage. Each file has many to many relationship with run numbers.
  3. Conditions. Name-value pairs are stored there
  4. Meta. Logs and SQL DB schema version