Removes option to delete test DB from run_tests.sh

Our tests have been growing the smarts to cleanup after themselves. This
feature is no longer needed.

Change-Id: I5ecdb0b286c31fd9b787055b77e47061c2f3bc5a
This commit is contained in:
David Stanek 2014-01-16 18:06:05 +00:00 committed by Adam Young
parent 13551727f6
commit 5acd286045

View File

@ -22,8 +22,6 @@ function usage {
echo ""
echo " -V, --virtual-env Always use virtualenv. Install automatically if not present"
echo " -N, --no-virtual-env Don't use virtualenv. Run tests in local environment"
echo " -r, --recreate-db Recreate the test database (deprecated, as this is now the default)."
echo " -n, --no-recreate-db Don't recreate the test database."
echo " -x, --stop Stop running tests after the first error or failure."
echo " -f, --force Force a clean re-build of the virtual environment. Useful when dependencies have been added."
echo " -u, --update Update the virtual environment with any newer package versions"
@ -44,8 +42,6 @@ function process_option {
-h|--help) usage;;
-V|--virtual-env) always_venv=1; never_venv=0;;
-N|--no-virtual-env) always_venv=0; never_venv=1;;
-r|--recreate-db) recreate_db=1;;
-n|--no-recreate-db) recreate_db=0;;
-f|--force) force=1;;
-u|--update) update=1;;
-p|--pep8) just_flake8=1;;
@ -69,7 +65,6 @@ just_flake8=0
short_flake8=0
no_flake8=0
coverage=0
recreate_db=1
update=0
for arg in "$@"; do
@ -83,14 +78,6 @@ if [ $coverage -eq 1 ]; then
TESTRTESTS="$TESTRTESTS --coverage"
fi
function cleanup_test_db {
# Default test settings will leave around some test*.db files
# TODO(termie): this could probably be moved into keystone/tests/__init__.py
# but there have been some issues with creating that
# file for some users
rm -f keystone/tests/*.db
}
function run_tests {
set -e
echo ${wrapper}
@ -158,10 +145,6 @@ if [ $short_flake8 -eq 1 ]; then
fi
if [ $recreate_db -eq 1 ]; then
cleanup_test_db
fi
run_tests
# NOTE(sirp): we only want to run flake8 when we're running the full-test