summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Pepple <ken.pepple@gmail.com>2011-02-08 11:31:20 -0800
committerKen Pepple <ken.pepple@gmail.com>2011-02-08 11:31:20 -0800
commit2f5d8a25c99875838a08ed06728bcd9d68cdd7f1 (patch)
treeb3ec15cd7891a0eadc7b4bc9d9e65d3bfe0d2078
parentffc788fb41bf5a4bcb85cfa80b3437ed94d46291 (diff)
added testing for nova-manage instance_type
-rw-r--r--nova/tests/test_nova_manage.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/nova/tests/test_nova_manage.py b/nova/tests/test_nova_manage.py
index 487f172ff..5645bf97e 100644
--- a/nova/tests/test_nova_manage.py
+++ b/nova/tests/test_nova_manage.py
@@ -66,6 +66,17 @@ class NovaManageTestCase(test.TestCase):
"120", "1"], stdout=fnull)
self.assertEqual(1, retcode)
+ def test_should_fail_on_duplicate_name(self):
+ fnull = open(os.devnull, 'w')
+ retcode = subprocess.call(["bin/nova-manage", "instance_type",\
+ "create", "fsfsfsdfsdf", "256", "1",\
+ "120", "189"], stdout=fnull)
+ self.assertEqual(0, retcode)
+ retcode = subprocess.call(["bin/nova-manage", "instance_type",\
+ "create", "fsfsfsdfsdf", "256", "1",\
+ "120", "190"], stdout=fnull)
+ self.assertEqual(1, retcode)
+
def test_instance_type_delete_should_fail_without_valid_name(self):
fnull = open(os.devnull, 'w')
retcode = subprocess.call(["bin/nova-manage", "instance_type",\