Merge "Added test to update the database schema to the latest revision"

This commit is contained in:
Zuul 2018-05-18 13:52:38 +00:00 committed by Gerrit Code Review
commit 33ea9e4ee7
1 changed files with 12 additions and 0 deletions

View File

@ -158,6 +158,17 @@ function setup_db_cfg {
esac
}
function upgrade_db {
case ${db_type} in
"postgresql" | "mysql" )
mistral-db-manage --config-file .mistral.conf upgrade head
;;
*)
echo "Skip a database upgrade"
;;
esac
}
function cleanup {
rm -f .mistral.conf
}
@ -282,6 +293,7 @@ fi
setup_db_pylib
setup_db_cfg
upgrade_db
run_tests
# NOTE(sirp): we only want to run pep8 when we're running the full-test suite,