Attempt to delete role of user with invalid parameters such as UserID, Tenant ID, Role ID in request is returning 500 error code.
Expected result:
Not found exception should be raised with code 404
Actual Result:
Error code 500
LOG:
------------
======================================================================
ERROR: Should not be able to DELETE role from nonexistant user on tenant
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/muralik/tempest_30may/tempest/tempest/tests/identity/test_integration.py", line 364, in test_delete_invalid_role_of_user
invalid_id[i])
File "/home/muralik/tempest_30may/tempest/tempest/services/identity/json/admin_client.py", line 157, in delete_role_from_user_on_tenant
% (tenant_id, user_id, role_id))
File "/home/muralik/tempest_30may/tempest/tempest/common/rest_client.py", line 158, in delete
return self.request('DELETE', url)
File "/home/muralik/tempest_30may/tempest/tempest/common/rest_client.py", line 224, in request
message = resp_body['computeFault']['message']
KeyError: '\'computeFault\'\n-------------------- >> begin captured logging << --------------------\ntempest.config: INFO: Using tempest config file /home/muralik/tempest_30may/tempest/etc/tempest.conf\ntempest.common.rest_client: ERROR: Request URL: http://10.233.52.27:35357/v2.0//tenants/6052ff20135c4c0ea81be59b0e706e11/users/ab39c6dc61b648a8afcdd119a6590bdf/roles/OS-KSADM/99944759323334\ntempest.common.rest_client: ERROR: Request Body: None\ntempest.common.rest_client: ERROR: Response Headers: {\'date\': \'Wed, 30 May 2012 13:57:01 GMT\', \'content-type\': \'application/json\', \'content-length\': \'161\', \'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. u\'99944759323334\'", u\'code\': 500, u\'title\': u\'Internal Server Error\'}}\n--------------------- >> end captured logging << ---------------------'
======================================================================
ERROR: Should not be able to DELETE role with nonexistant tenant ID in request
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/muralik/tempest_30may/tempest/tempest/tests/identity/test_integration.py", line 338, in test_delete_role_of_invalid_tenant
self.role_ids[1])
File "/home/muralik/tempest_30may/tempest/tempest/services/identity/json/admin_client.py", line 157, in delete_role_from_user_on_tenant
% (tenant_id, user_id, role_id))
File "/home/muralik/tempest_30may/tempest/tempest/common/rest_client.py", line 158, in delete
return self.request('DELETE', url)
File "/home/muralik/tempest_30may/tempest/tempest/common/rest_client.py", line 224, in request
message = resp_body['computeFault']['message']
KeyError: '\'computeFault\'\n-------------------- >> begin captured logging << --------------------\ntempest.common.rest_client: ERROR: Request URL: http://10.233.52.27:35357/v2.0//tenants/99923932989272/users/ab39c6dc61b648a8afcdd119a6590bdf/roles/OS-KSADM/741a74328d7c44488c0780c3ae3a788f\ntempest.common.rest_client: ERROR: Request Body: None\ntempest.common.rest_client: ERROR: Response Headers: {\'date\': \'Wed, 30 May 2012 13:57:01 GMT\', \'content-type\': \'application/json\', \'content-length\': \'179\', \'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. u\'741a74328d7c44488c0780c3ae3a788f\'", u\'code\': 500, u\'title\': u\'Internal Server Error\'}}\n--------------------- >> end captured logging << ---------------------'
======================================================================
ERROR: Should not be able to DELETE role from nonexistant user on tenant
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/muralik/tempest_30may/tempest/tempest/tests/identity/test_integration.py", line 312, in test_delete_role_of_invalid_user
self.role_ids[1])
File "/home/muralik/tempest_30may/tempest/tempest/services/identity/json/admin_client.py", line 157, in delete_role_from_user_on_tenant
% (tenant_id, user_id, role_id))
File "/home/muralik/tempest_30may/tempest/tempest/common/rest_client.py", line 158, in delete
return self.request('DELETE', url)
File "/home/muralik/tempest_30may/tempest/tempest/common/rest_client.py", line 224, in request
message = resp_body['computeFault']['message']
KeyError: '\'computeFault\'\n-------------------- >> begin captured logging << --------------------\ntempest.common.rest_client: ERROR: Request URL: http://10.233.52.27:35357/v2.0//tenants/6052ff20135c4c0ea81be59b0e706e11/users/99916982875333/roles/OS-KSADM/741a74328d7c44488c0780c3ae3a788f\ntempest.common.rest_client: ERROR: Request Body: None\ntempest.common.rest_client: ERROR: Response Headers: {\'date\': \'Wed, 30 May 2012 13:57:01 GMT\', \'content-type\': \'application/json\', \'content-length\': \'179\', \'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. u\'741a74328d7c44488c0780c3ae3a788f\'", u\'code\': 500, u\'title\': u\'Internal Server Error\'}}\n--------------------- >> end captured logging << ---------------------'
----------------------------------------------------------------------
Looks like a Dup of https:/ /bugs.launchpad .net/nova/ +bug/999567
Rajalakshmi, please check my branch IdentityAdmin branch, to avoid duplication of effort. /review. openstack. org/#/c/ 7438/
https:/
Many tests are already under review.