summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2011-10-26 14:04:42 +0000
committerJohannes Erdfelt <johannes.erdfelt@rackspace.com>2011-10-26 14:34:23 +0000
commit46cf865831fdb50a1da0044ca83cc4f0de8876e4 (patch)
treeb492406dccb8d110fa62d7cc1494a975ecb70390 /nova/api
parent7cd3d73bc8729c00b739166e92050b659dd4602e (diff)
downloadnova-46cf865831fdb50a1da0044ca83cc4f0de8876e4.tar.gz
nova-46cf865831fdb50a1da0044ca83cc4f0de8876e4.tar.xz
nova-46cf865831fdb50a1da0044ca83cc4f0de8876e4.zip
Speed up test suite by 20 seconds
Change openstack API server actions test to use controller directly, bypassing WSGI layer. This shaves up to half a second off each test and can speed up test suite by 20 seconds. Change-Id: Ideadbeef2232753eae628d0ffdd534055f1dbc40
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/servers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index f4844e0e7..3a16b0c7d 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -781,11 +781,11 @@ class Controller(object):
if (not 'changePassword' in input_dict
or not 'adminPass' in input_dict['changePassword']):
msg = _("No adminPass was specified")
- return exc.HTTPBadRequest(explanation=msg)
+ raise exc.HTTPBadRequest(explanation=msg)
password = input_dict['changePassword']['adminPass']
if not isinstance(password, basestring) or password == '':
msg = _("Invalid adminPass")
- return exc.HTTPBadRequest(explanation=msg)
+ raise exc.HTTPBadRequest(explanation=msg)
self.compute_api.set_admin_password(context, id, password)
return webob.Response(status_int=202)