diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-03-03 00:52:58 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-03-03 00:52:58 +0000 |
| commit | d9097f35cd391fcd5a8ec735abd3b53e634bfa14 (patch) | |
| tree | 6c797d41f25fc4b62fe9112df9591fe05c58d90a /nova/tests | |
| parent | 065df7cdf41fbe453cd7ca165777a3f55e9e29e1 (diff) | |
| parent | 2efb017a06afeb10b474245455310ec21601a701 (diff) | |
Merge "Adds soft-reboot support to libvirt"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/fakelibvirt.py | 6 | ||||
| -rw-r--r-- | nova/tests/test_virt_drivers.py | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/nova/tests/fakelibvirt.py b/nova/tests/fakelibvirt.py index 309a6f10f..81f946f4d 100644 --- a/nova/tests/fakelibvirt.py +++ b/nova/tests/fakelibvirt.py @@ -288,8 +288,12 @@ class Domain(object): def suspend(self): self._state = VIR_DOMAIN_PAUSED + def shutdown(self): + self._state = VIR_DOMAIN_SHUTDOWN + self._connection._mark_not_running(self) + def info(self): - return [VIR_DOMAIN_RUNNING, + return [self._state, long(self._def['memory']), long(self._def['memory']), self._def['vcpu'], diff --git a/nova/tests/test_virt_drivers.py b/nova/tests/test_virt_drivers.py index 5b5b7d42e..8018008a6 100644 --- a/nova/tests/test_virt_drivers.py +++ b/nova/tests/test_virt_drivers.py @@ -476,6 +476,10 @@ class LibvirtConnTestCase(_VirtDriverTestCase): nova.virt.libvirt.firewall.libvirt = self.saved_libvirt super(LibvirtConnTestCase, self).tearDown() + def test_force_hard_reboot(self): + self.flags(libvirt_wait_soft_reboot_seconds=0) + self.test_reboot() + @test.skip_test("Test nothing, but this method " "needed to override superclass.") def test_migrate_disk_and_power_off(self): |
