diff options
-rw-r--r-- | nova/tests/api/openstack/compute/test_server_actions.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nova/tests/api/openstack/compute/test_server_actions.py b/nova/tests/api/openstack/compute/test_server_actions.py index fe085f99d..157ac0e8d 100644 --- a/nova/tests/api/openstack/compute/test_server_actions.py +++ b/nova/tests/api/openstack/compute/test_server_actions.py @@ -347,6 +347,21 @@ class ServerActionsControllerTest(test.TestCase): self.controller._action_rebuild, req, FAKE_UUID, body) + def test_rebuild_with_too_large_metadata(self): + body = { + "rebuild": { + "imageRef": self._image_href, + "metadata": { + 256 * "k": "value" + } + } + } + + req = fakes.HTTPRequest.blank(self.url) + self.assertRaises(webob.exc.HTTPRequestEntityTooLarge, + self.controller._action_rebuild, req, + FAKE_UUID, body) + def test_rebuild_bad_entity(self): body = { "rebuild": { |