summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keystone/common/sql/util.py3
-rwxr-xr-xrun_tests.sh10
2 files changed, 9 insertions, 4 deletions
diff --git a/keystone/common/sql/util.py b/keystone/common/sql/util.py
index 7ddba631..c31e50c0 100644
--- a/keystone/common/sql/util.py
+++ b/keystone/common/sql/util.py
@@ -40,6 +40,3 @@ def setup_test_database():
def teardown_test_database():
core.set_global_engine(None)
-
- if os.path.exists('test.db.pristine'):
- os.unlink('test.db.pristine')
diff --git a/run_tests.sh b/run_tests.sh
index 3218b787..22447c04 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -93,6 +93,14 @@ if [ $nokeystoneclient -eq 1 ]; then
noseopts="$noseopts -I test_keystoneclient*"
fi
+function cleanup_test_db {
+ # Default test settings will leave around some test*.db files
+ # TODO(termie): this could probably be moved into tests/__init__.py
+ # but there have been some issues with creating that
+ # file for some users
+ rm -f tests/test*.db
+}
+
function run_tests {
# Just run the test suites in current environment
${wrapper} $NOSETESTS
@@ -179,7 +187,7 @@ fi
if [ $recreate_db -eq 1 ]; then
- rm -f tests.sqlite
+ cleanup_test_db
fi
run_tests