summaryrefslogtreecommitdiffstats
path: root/tests/test_import_legacy.py
diff options
context:
space:
mode:
authorJamie Lennox <jlennox@redhat.com>2013-07-04 15:58:04 +1000
committerJamie Lennox <jlennox@redhat.com>2013-07-11 09:31:39 +1000
commit2397133b8fe611fa3b07cf8a11549c9ba4de1b42 (patch)
tree7faf915770fda5bf0ba37a4f4765321737842faf /tests/test_import_legacy.py
parent63f962ff59d1f0698ba446a6b00db72a3ed8a929 (diff)
downloadkeystone-2397133b8fe611fa3b07cf8a11549c9ba4de1b42.tar.gz
keystone-2397133b8fe611fa3b07cf8a11549c9ba4de1b42.tar.xz
keystone-2397133b8fe611fa3b07cf8a11549c9ba4de1b42.zip
Move temporary test files into tests/tmp
Add a new folder tests/tmp and move all temporary test artefacts like sqlite dbs into the folder. This has a number of advantages: - clean up .gitignore and tests folder. - common/sql/util.py files didn't really belong in common as they were test only. - by doing ``sudo mount -t tmpfs -o size=16M tmpfs tests/tmp; sudo chown $USER: tests/tmp`` tests speed up about 3x (ext4; credit ayoung's blog). Change-Id: I9b02a5273dd27db963e9a26085b7456f4c5f6a41
Diffstat (limited to 'tests/test_import_legacy.py')
-rw-r--r--tests/test_import_legacy.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_import_legacy.py b/tests/test_import_legacy.py
index 2642a2cf..9e164099 100644
--- a/tests/test_import_legacy.py
+++ b/tests/test_import_legacy.py
@@ -25,7 +25,6 @@ from keystone import test
from keystone.catalog.backends import templated as catalog_templated
from keystone.common.sql import legacy
-from keystone.common.sql import util as sql_util
from keystone import config
from keystone import identity
from keystone.identity.backends import sql as identity_sql
@@ -41,17 +40,17 @@ class ImportLegacy(test.TestCase):
test.testsdir('test_overrides.conf'),
test.testsdir('backend_sql.conf'),
test.testsdir('backend_sql_disk.conf')])
- sql_util.setup_test_database()
+ test.setup_test_database()
self.identity_man = identity.Manager()
self.identity_api = identity_sql.Identity()
def tearDown(self):
- sql_util.teardown_test_database()
+ test.teardown_test_database()
super(ImportLegacy, self).tearDown()
def setup_old_database(self, sql_dump):
sql_path = test.testsdir(sql_dump)
- db_path = test.testsdir('%s.db' % sql_dump)
+ db_path = test.tmpdir('%s.db' % sql_dump)
try:
os.unlink(db_path)
except OSError: