summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortermie <github@anarkystic.com>2013-04-04 14:23:48 -0700
committertermie <github@anarkystic.com>2013-04-05 14:36:56 -0700
commit3f296e056cdbbee3636daceb7609efea0686b2d7 (patch)
treec46ca920d14832415dcb6e9ef8b8298b65c6f40a
parent31c6cd80e45466912836daa9303a4e8c154698c4 (diff)
downloadkeystone-3f296e056cdbbee3636daceb7609efea0686b2d7.tar.gz
keystone-3f296e056cdbbee3636daceb7609efea0686b2d7.tar.xz
keystone-3f296e056cdbbee3636daceb7609efea0686b2d7.zip
don't migrate as often
saves a bunch of time in the tests (the savings are more noticable if you are not running the integration tests) before: Slowest 5 tests took 5.80 secs: 1.53 TokenExpirationTest.test_maintain_uuid_token_expiration 1.22 TestTokenRevoking.test_deleting_group_grant_revokes_tokens 1.08 TestTokenRevoking.test_group_membership_changes_revokes_token 1.06 IdentityTestCase.test_crud_group_domain_role_grants 0.92 CatalogTestCase.test_create_endpoint_on_v2 ---------------------------------------------------------------------- Ran 1274 tests in 149.136s OK (SKIP=84) after: Slowest 5 tests took 4.82 secs: 1.53 TokenExpirationTest.test_maintain_uuid_token_expiration 0.90 TestTokenRevoking.test_deleting_group_grant_revokes_tokens 0.84 TestTokenRevoking.test_group_membership_changes_revokes_token 0.78 Kc11TestCase.test_token_expiry_maintained 0.77 TestTokenRevoking.test_deleting_user_grant_revokes_token ---------------------------------------------------------------------- Ran 1274 tests in 102.986s OK (SKIP=84) Change-Id: I1f39ad0412e739a333e4b755ca00a94ccbf400be
-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 bfa2dbcc..399dc5cf 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