diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-03-12 23:58:43 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-03-12 23:58:43 +0000 |
| commit | 071719a3e16b747bc9c2cdadab829c3c1287eede (patch) | |
| tree | 6d9f4781c400eca0385a5220072729e368f11c58 /nova | |
| parent | 57231f485e3f35b270ef1313e037d9f8f7ca7575 (diff) | |
| parent | 071a41f1d052bd01b181e4ae5d6e9aa5f0b39b8b (diff) | |
| download | nova-071719a3e16b747bc9c2cdadab829c3c1287eede.tar.gz nova-071719a3e16b747bc9c2cdadab829c3c1287eede.tar.xz nova-071719a3e16b747bc9c2cdadab829c3c1287eede.zip | |
Merge "Fix: nova-manage throws uncaught exception on invalid host/service"
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/tests/test_nova_manage.py | 14 |
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') |
