summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorAlex Meade <alex.meade@rackspace.com>2011-08-23 00:44:47 +0000
committerTarmac <>2011-08-23 00:44:47 +0000
commit4e987a070ad3d50d2b47a894029f981168bacd1f (patch)
tree7b620debeffb6c9e20d2ddb5051620df821beda6 /nova
parent2444acdff40c6c44fc0f3d013b6a893f3a0b5c1d (diff)
parent0a9a6db83aca1f84b6e7943edd492e9fbc066063 (diff)
downloadnova-4e987a070ad3d50d2b47a894029f981168bacd1f.tar.gz
nova-4e987a070ad3d50d2b47a894029f981168bacd1f.tar.xz
nova-4e987a070ad3d50d2b47a894029f981168bacd1f.zip
Fixes bug 831627 where nova-manage does not exit when given a non-existent network address
Diffstat (limited to 'nova')
-rw-r--r--nova/tests/test_nova_manage.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/tests/test_nova_manage.py b/nova/tests/test_nova_manage.py
index 3a6e48dec..f5ea68a03 100644
--- a/nova/tests/test_nova_manage.py
+++ b/nova/tests/test_nova_manage.py
@@ -55,8 +55,18 @@ class FixedIpCommandsTestCase(test.TestCase):
'192.168.0.100')
self.assertEqual(address['reserved'], True)
+ def test_reserve_nonexistent_address(self):
+ self.assertRaises(SystemExit,
+ self.commands.reserve,
+ '55.55.55.55')
+
def test_unreserve(self):
self.commands.unreserve('192.168.0.100')
address = db.fixed_ip_get_by_address(context.get_admin_context(),
'192.168.0.100')
self.assertEqual(address['reserved'], False)
+
+ def test_unreserve_nonexistent_address(self):
+ self.assertRaises(SystemExit,
+ self.commands.unreserve,
+ '55.55.55.55')