summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorBrian Waldon <bcwaldon@gmail.com>2012-05-01 08:19:02 -0700
committerBrian Waldon <bcwaldon@gmail.com>2012-05-01 10:32:44 -0700
commitac21815ecb977840e90cee807fac7992d060c643 (patch)
tree2b3157888dd2fa54b32484ada5fb963ea7405a08 /nova/tests
parente6b1370d823cdcdb5201152010f0bb27e424b2d3 (diff)
Allow blank adminPass on server create
* Fixes bug 992648 Change-Id: Ib796904b3155300a178e37d129e398817c8747d6
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/compute/test_servers.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/tests/api/openstack/compute/test_servers.py b/nova/tests/api/openstack/compute/test_servers.py
index 514d7cf84..e1a01b09f 100644
--- a/nova/tests/api/openstack/compute/test_servers.py
+++ b/nova/tests/api/openstack/compute/test_servers.py
@@ -2119,10 +2119,11 @@ class ServersControllerCreateTest(test.TestCase):
self.assertTrue('adminPass' not in server)
def test_create_instance_admin_pass_empty(self):
+ image_uuid = '76fa36fc-c930-4bf3-8c8a-ea2a2420deb6'
body = {
'server': {
'name': 'server_test',
- 'imageRef': 3,
+ 'imageRef': image_uuid,
'flavorRef': 3,
'adminPass': '',
},
@@ -2133,8 +2134,8 @@ class ServersControllerCreateTest(test.TestCase):
req.body = json.dumps(body)
req.headers['content-type'] = "application/json"
- self.assertRaises(webob.exc.HTTPBadRequest,
- self.controller.create, req, body)
+ # The fact that the action doesn't raise is enough validation
+ self.controller.create(req, body)
def test_create_instance_malformed_entity(self):
req = fakes.HTTPRequest.blank('/v2/fake/servers')