From 82d8ffec5b5220039e57685fe4359950d1209b14 Mon Sep 17 00:00:00 2001 From: vijaya-erukala Date: Tue, 9 Oct 2012 19:25:27 +0530 Subject: nova-manage doesn't validate key to update the quota nova-manage doesn't validate the key value supplied to update the quota, as a result unnecessary records will be created in db and user will be under the impression that quota value got updated. This patch validates the input value given to the key. fixes bug 1064359 Change-Id: I9928f30881aa2780a23005b5f69aa67a44f314c5 --- nova/tests/test_nova_manage.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nova') diff --git a/nova/tests/test_nova_manage.py b/nova/tests/test_nova_manage.py index 537aee287..ec5d452a5 100644 --- a/nova/tests/test_nova_manage.py +++ b/nova/tests/test_nova_manage.py @@ -367,3 +367,8 @@ class ProjectCommandsTestCase(test.TestCase): sys.stdout = sys.__stdout__ result = output.getvalue() self.assertEquals(('volumes: unlimited' in result), True) + + def test_quota_update_invalid_key(self): + self.assertRaises(SystemExit, + self.commands.quota, 'admin', 'volumes1', '10' + ) -- cgit