Clean up DB migrations when running unit tests
When doing development work, all kinds of issue can result when moving between versions of the code that have added/removed DB migration scripts if the compiled .pyc files are left behind. To save the need to do this manually, remove all of the .pyc files when the unit tests are run. Change-Id: Ia4bc889edeeed499e5fc2172d5f7c1b4e693a27b
This commit is contained in:
parent
2e43c2a3ee
commit
9ebf853c5d
@ -40,6 +40,8 @@ wrapper=""
|
||||
|
||||
function run_tests {
|
||||
echo 'Running tests'
|
||||
# Remove any extraneous DB migrations
|
||||
find heat/db/sqlalchemy/migrate_repo/versions/ -name '*.pyc' -delete
|
||||
# Just run the test suites in current environment
|
||||
if [ -n "$args" ] ; then
|
||||
args="-t $args"
|
||||
|
Loading…
Reference in New Issue
Block a user