summaryrefslogtreecommitdiff
path: root/keystone/tests/test_backend.py
diff options
context:
space:
mode:
authorMorgan Fainberg <m@metacloud.com>2013-10-25 15:05:52 -0700
committerMorgan Fainberg <m@metacloud.com>2013-12-03 10:45:40 -0800
commit99fafca3ba6f3fb8d045e8c2b634762ed7bccaf7 (patch)
tree64cc33dae19e2b1e697f106f3ff47d27899a2158 /keystone/tests/test_backend.py
parentfe7653679c12247f4c2f01ffb6a809ddae9bf182 (diff)
downloadkeystone-99fafca3ba6f3fb8d045e8c2b634762ed7bccaf7.tar.gz
Allow caching to be disabled and tests still pass
Skip cache specific tests if caching is disabled. Cache should only be disabled to eliminate caching as an issue with tests, but in all cases tests should pass in either configuration. The default is to use caching for all tests. The caching options can be changed for testing purposes in the keystone/tests/test_overrides.conf file. The specific options and sections that support caching can be located in the configuration document in the section covering the caching layer. Change-Id: I7848128aeaf3f578b89ab0b9201c45e00efecf11
Diffstat (limited to 'keystone/tests/test_backend.py')
-rw-r--r--keystone/tests/test_backend.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/keystone/tests/test_backend.py b/keystone/tests/test_backend.py
index b741b6871..89b5e88a6 100644
--- a/keystone/tests/test_backend.py
+++ b/keystone/tests/test_backend.py
@@ -2571,6 +2571,7 @@ class IdentityTests(object):
user_projects = self.assignment_api.list_projects_for_user(user1['id'])
self.assertEqual(len(user_projects), 3)
+ @tests.skip_if_cache_disabled('assignment')
def test_cache_layer_domain_crud(self):
domain = {'id': uuid.uuid4().hex, 'name': uuid.uuid4().hex,
'enabled': True}
@@ -2617,6 +2618,7 @@ class IdentityTests(object):
self.assignment_api.get_domain,
domain_id)
+ @tests.skip_if_cache_disabled('assignment')
def test_cache_layer_project_crud(self):
domain = {'id': uuid.uuid4().hex, 'name': uuid.uuid4().hex,
'enabled': True}
@@ -2669,6 +2671,7 @@ class IdentityTests(object):
self.assignment_api.get_project,
project_id)
+ @tests.skip_if_cache_disabled('assignment')
def test_cache_layer_role_crud(self):
role = {'id': uuid.uuid4().hex, 'name': uuid.uuid4().hex}
role_id = role['id']
@@ -2996,6 +2999,7 @@ class TokenTests(object):
self.assertEqual(len(tokens), 1)
self.assertIn(token_id, tokens)
+ @tests.skip_if_cache_disabled('token')
def test_revocation_list_cache(self):
expire_time = timeutils.utcnow() + datetime.timedelta(minutes=10)
token_id = uuid.uuid4().hex