Commit 15b015ab by Ben Patterson

Only update comments; leave reset_db in place.

parent d4554fb1
...@@ -24,19 +24,17 @@ ...@@ -24,19 +24,17 @@
DB_CACHE_DIR="common/test/db_cache" DB_CACHE_DIR="common/test/db_cache"
# Ensure a new test database exists. This means the same machine # Ensure the test database exists.
# can be used multiple times with the same MySQL instance (e.g., echo "CREATE DATABASE IF NOT EXISTS edxtest;" | mysql -u root
# a build or development machine).
echo "DROP DATABASE IF EXISTS edxtest;" | mysql -u root
echo "CREATE DATABASE edxtest;" | mysql -u root
# Reset the test database # Clear out the test database
# #
# To support multiple runs using the --serversonly / --testsonly switches # We are using the django-extensions's reset_db command which uses "DROP DATABASE" and
# for paver test_bokchoy, we flush data from the database without affecting # "CREATE DATABASE" in case the tests are being run in an environment (e.g. devstack
# schema through Django's 'flush' management command. # or a jenkins worker environment) that already ran tests on another commit that had
echo "Flushing the bok_choy MySQL database." # different migrations that created, dropped, or altered tables.
./manage.py lms --settings bok_choy flush --traceback --noinput echo "Issuing a reset_db command to the bok_choy MySQL database."
./manage.py lms --settings bok_choy reset_db --traceback --noinput
# If there are cached database schemas/data, load them # If there are cached database schemas/data, load them
if [[ -f $DB_CACHE_DIR/bok_choy_schema.sql && -f $DB_CACHE_DIR/bok_choy_migrations_data.sql && -f $DB_CACHE_DIR/bok_choy_data.json ]]; then if [[ -f $DB_CACHE_DIR/bok_choy_schema.sql && -f $DB_CACHE_DIR/bok_choy_migrations_data.sql && -f $DB_CACHE_DIR/bok_choy_data.json ]]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment