summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
Diffstat (limited to 'nova')
-rw-r--r--nova/tests/test_nova_manage.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/nova/tests/test_nova_manage.py b/nova/tests/test_nova_manage.py
index b1d1958f0..49f9f3256 100644
--- a/nova/tests/test_nova_manage.py
+++ b/nova/tests/test_nova_manage.py
@@ -382,3 +382,17 @@ class DBCommandsTestCase(test.TestCase):
def test_archive_deleted_rows_negative(self):
self.assertRaises(SystemExit,
self.commands.archive_deleted_rows, -1)
+
+
+class ServiceCommandsTestCase(test.TestCase):
+ def setUp(self):
+ super(ServiceCommandsTestCase, self).setUp()
+ self.commands = nova_manage.ServiceCommands()
+
+ def test_service_enable_invalid_params(self):
+ self.assertRaises(SystemExit,
+ self.commands.enable, 'nohost', 'noservice')
+
+ def test_service_disable_invalid_params(self):
+ self.assertRaises(SystemExit,
+ self.commands.disable, 'nohost', 'noservice')