Our tempest test calls the delete_role_ref() Admin API and passes an invalid/non-existent value for userId.
Expected result: HTTP 404 NotFound or HTTP 400 BadRequest error.
Actual Result: HTTP 500 Internal Server Error is returned
======================================================================
ERROR: Attempt to delete a role from a non existent user should fail
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/stack/tempest/tests/identity/test_roles.py", line 185, in test_delete_user_role_non_existant_user
'junk-user-id-123', role['id'])
File "/usr/lib/pymodules/python2.7/unittest2/case.py", line 475, in assertRaises
callableObj(*args, **kwargs)
File "/opt/stack/tempest/services/identity/json/admin_client.py", line 80, in delete_user_role
resp, body = self.delete('users/%s/roleRefs/%s' % (user_id, role_id))
File "/opt/stack/tempest/common/rest_client.py", line 163, in delete
return self.request('DELETE', url)
File "/opt/stack/tempest/common/rest_client.py", line 229, in request
message = resp_body['computeFault']['message']
KeyError: '\'computeFault\'\n-------------------- >> begin captured logging << --------------------\ntempest.config: INFO: Using tempest config file /opt/stack/etc/tempest.conf\ntempest.common.rest_client: ERROR: Request URL: http://10.2.3.164:35357/v2.0/users/junk-user-id-123/roleRefs/3d3fb10c2b184204a484bfe0440ac38c\ntempest.common.rest_client: ERROR: Request Body: None\ntempest.common.rest_client: ERROR: Response Headers: {\'date\': \'Tue, 15 May 2012 09:49:37 GMT\', \'content-type\': \'application/json\', \'content-length\': \'182\', \'status\': \'500\', \'vary\': \'X-Auth-Token\'}\ntempest.common.rest_client: ERROR: Response Body: {u\'error\': {u\'message\': u"An unexpected error prevented the server from fulfilling your request. \'NoneType\' object is not subscriptable", u\'code\': 500, u\'title\': u\'Internal Server Error\'}}\n--------------------- >> end captured logging << ---------------------'
Our tempest test calls the delete_role_ref() Admin API and passes an invalid/ non-existent value for userId.
Expected result: HTTP 404 NotFound or HTTP 400 BadRequest error.
Actual Result: HTTP 500 Internal Server Error is returned
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ------- ------- ------- ------- ------- ------- ------- ------- ------- tempest/ tests/identity/ test_roles. py", line 185, in test_delete_ user_role_ non_existant_ user user-id- 123', role['id']) pymodules/ python2. 7/unittest2/ case.py" , line 475, in assertRaises (*args, **kwargs) tempest/ services/ identity/ json/admin_ client. py", line 80, in delete_user_role 'users/ %s/roleRefs/ %s' % (user_id, role_id)) tempest/ common/ rest_client. py", line 163, in delete 'DELETE' , url) tempest/ common/ rest_client. py", line 229, in request 'computeFault' ]['message' ] \'\n--- ------- ------- --- >> begin captured logging << ------- ------- ------\ ntempest. config: INFO: Using tempest config file /opt/stack/ etc/tempest. conf\ntempest. common. rest_client: ERROR: Request URL: http:// 10.2.3. 164:35357/ v2.0/users/ junk-user- id-123/ roleRefs/ 3d3fb10c2b18420 4a484bfe0440ac3 8c\ntempest. common. rest_client: ERROR: Request Body: None\ntempest. common. rest_client: ERROR: Response Headers: {\'date\': \'Tue, 15 May 2012 09:49:37 GMT\', \'content-type\': \'application/ json\', \'content-length\': \'182\', \'status\': \'500\', \'vary\': \'X-Auth- Token\' }\ntempest. common. rest_client: ERROR: Response Body: {u\'error\': {u\'message\': u"An unexpected error prevented the server from fulfilling your request. \'NoneType\' object is not subscriptable", u\'code\': 500, u\'title\': u\'Internal Server Error\' }}\n--- ------- ------- ---- >> end captured logging << ------- ------- ------- '
ERROR: Attempt to delete a role from a non existent user should fail
-------
Traceback (most recent call last):
File "/opt/stack/
'junk-
File "/usr/lib/
callableObj
File "/opt/stack/
resp, body = self.delete(
File "/opt/stack/
return self.request(
File "/opt/stack/
message = resp_body[
KeyError: '\'computeFault
------- ------- ------- ------- ------- ------- ------- ------- ------- -------