Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
15b015ab
Commit
15b015ab
authored
Jan 14, 2016
by
Ben Patterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only update comments; leave reset_db in place.
parent
d4554fb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
scripts/reset-test-db.sh
+9
-11
No files found.
scripts/reset-test-db.sh
View file @
15b015ab
...
...
@@ -24,19 +24,17 @@
DB_CACHE_DIR
=
"common/test/db_cache"
# Ensure a new test database exists. This means the same machine
# can be used multiple times with the same MySQL instance (e.g.,
# a build or development machine).
echo
"DROP DATABASE IF EXISTS edxtest;"
| mysql
-u
root
echo
"CREATE DATABASE edxtest;"
| mysql
-u
root
# Ensure the test database exists.
echo
"CREATE DATABASE IF NOT EXISTS edxtest;"
| mysql
-u
root
#
Rese
t the test database
#
Clear ou
t the test database
#
# To support multiple runs using the --serversonly / --testsonly switches
# for paver test_bokchoy, we flush data from the database without affecting
# schema through Django's 'flush' management command.
echo
"Flushing the bok_choy MySQL database."
./manage.py lms
--settings
bok_choy flush
--traceback
--noinput
# We are using the django-extensions's reset_db command which uses "DROP DATABASE" and
# "CREATE DATABASE" in case the tests are being run in an environment (e.g. devstack
# or a jenkins worker environment) that already ran tests on another commit that had
# different migrations that created, dropped, or altered tables.
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
[[
-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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment