summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_backend_sql.py12
-rw-r--r--tests/test_import_legacy.py4
-rw-r--r--tests/test_keystoneclient_sql.py4
-rw-r--r--tests/test_migrate_nova_auth.py4
4 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_backend_sql.py b/tests/test_backend_sql.py
index ee181dee..e8c345a7 100644
--- a/tests/test_backend_sql.py
+++ b/tests/test_backend_sql.py
@@ -42,6 +42,10 @@ class SqlIdentity(test.TestCase, test_backend.IdentityTests):
self.identity_api = identity_sql.Identity()
self.load_fixtures(default_fixtures)
+ def tearDown(self):
+ sql_util.teardown_test_database()
+ super(SqlIdentity, self).tearDown()
+
def test_delete_user_with_tenant_association(self):
user = {'id': uuid.uuid4().hex,
'name': uuid.uuid4().hex,
@@ -143,6 +147,10 @@ class SqlToken(test.TestCase, test_backend.TokenTests):
sql_util.setup_test_database()
self.token_api = token_sql.Token()
+ def tearDown(self):
+ sql_util.teardown_test_database()
+ super(SqlToken, self).tearDown()
+
class SqlCatalog(test.TestCase, test_backend.CatalogTests):
def setUp(self):
@@ -154,3 +162,7 @@ class SqlCatalog(test.TestCase, test_backend.CatalogTests):
self.catalog_api = catalog_sql.Catalog()
self.catalog_man = catalog.Manager()
self.load_fixtures(default_fixtures)
+
+ def tearDown(self):
+ sql_util.teardown_test_database()
+ super(SqlCatalog, self).tearDown()
diff --git a/tests/test_import_legacy.py b/tests/test_import_legacy.py
index 84c4bb6b..c5cd481f 100644
--- a/tests/test_import_legacy.py
+++ b/tests/test_import_legacy.py
@@ -39,6 +39,10 @@ class ImportLegacy(test.TestCase):
sql_util.setup_test_database()
self.identity_api = identity_sql.Identity()
+ def tearDown(self):
+ sql_util.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)
diff --git a/tests/test_keystoneclient_sql.py b/tests/test_keystoneclient_sql.py
index e4178dc8..541ca670 100644
--- a/tests/test_keystoneclient_sql.py
+++ b/tests/test_keystoneclient_sql.py
@@ -34,6 +34,10 @@ class KcMasterSqlTestCase(test_keystoneclient.KcMasterTestCase):
test.testsdir('backend_sql.conf')])
sql_util.setup_test_database()
+ def tearDown(self):
+ sql_util.teardown_test_database()
+ super(KcMasterSqlTestCase, self).tearDown()
+
def test_endpoint_crud(self):
from keystoneclient import exceptions as client_exceptions
diff --git a/tests/test_migrate_nova_auth.py b/tests/test_migrate_nova_auth.py
index 34375d12..d699d4b8 100644
--- a/tests/test_migrate_nova_auth.py
+++ b/tests/test_migrate_nova_auth.py
@@ -75,6 +75,10 @@ class MigrateNovaAuth(test.TestCase):
self.identity_api = identity_sql.Identity()
self.ec2_api = ec2_sql.Ec2()
+ def tearDown(self):
+ sql_util.teardown_test_database()
+ super(MigrateNovaAuth, self).tearDown()
+
def _create_role(self, role_name):
role_id = uuid.uuid4().hex
role_dict = {'id': role_id, 'name': role_name}