fix unit test when memcache middleware is not configured
Fixes: keystoneclient.middleware.auth_token: INFO: Starting keystone auth_token middlewa re keystoneclient.middleware.auth_token: INFO: Using /opt/stack/keystone/examples/pk i/certs as cache directory for signing certificate keystoneclient.middleware.auth_token: DEBUG: Authenticating user token keystoneclient.middleware.auth_token: DEBUG: Removing headers from request enviro nment: X-Identity-Status,X-Tenant-Id,X-Tenant-Name,X-User-Id,X-User-Name,X-Roles, X-Service-Catalog,X-User,X-Tenant,X-Role keystoneclient.middleware.auth_token: DEBUG: Keystone did not return json-encoded body keystoneclient.middleware.auth_token: DEBUG: Marking token invalid-token as unaut horized in memcache keystoneclient.middleware.auth_token: DEBUG: Token validation failure. Traceback (most recent call last): File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py" , line 574, in _validate_user_token data = self.verify_uuid_token(user_token, retry) File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py" , line 824, in verify_uuid_token self._cache_store_invalid(user_token) File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py" , line 794, in _cache_store_invalid self._cache_store(token, 'invalid') File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py" , line 771, in _cache_store timeout=self.token_cache_time) TypeError: set() got an unexpected keyword argument 'timeout' keystoneclient.middleware.auth_token: DEBUG: Marking token invalid-token as unaut horized in memcache This can be reproduced on devstack. Fixes bug 1102520 Change-Id: Ib9e110d60df40e30d74c3059bd25e459a95f9850
This commit is contained in:
parent
549aaf4685
commit
5cd2fa9121
@ -229,7 +229,7 @@ class FakeMemcache(object):
|
||||
data['access']['token']['expires'] = ks_expires
|
||||
return (data, str(self.token_expiration))
|
||||
|
||||
def set(self, key, value, time=None):
|
||||
def set(self, key, value, time=None, timeout=None):
|
||||
self.set_value = value
|
||||
self.set_key = key
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user