diff options
| author | Dan Prince <dan.prince@rackspace.com> | 2011-08-22 11:59:08 -0400 |
|---|---|---|
| committer | Dan Prince <dan.prince@rackspace.com> | 2011-08-22 11:59:08 -0400 |
| commit | d60f813201df345507ce0aca7bed0f8b719aabfe (patch) | |
| tree | daeb7198132388f4174f82b3faab89a582eb7a11 /nova/tests | |
| parent | a450c0f3bcc93fe3ec74939e49b109cb02624913 (diff) | |
Fixes/updates to make test_cloud pass.
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_cloud.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py index cce9514ec..4d148f39e 100644 --- a/nova/tests/test_cloud.py +++ b/nova/tests/test_cloud.py @@ -38,6 +38,7 @@ from nova import test from nova import utils from nova.api.ec2 import cloud from nova.api.ec2 import ec2utils +from nova.compute import vm_states from nova.image import fake @@ -1174,12 +1175,12 @@ class CloudTestCase(test.TestCase): def _wait_for_running(self, instance_id): def is_running(info): - return info['vm_state'] == 'running' + return info['vm_state'] == vm_states.ACTIVE self._wait_for_state(self.context, instance_id, is_running) def _wait_for_stopped(self, instance_id): def is_stopped(info): - return info['vm_state'] == 'stopped' + return info['vm_state'] == vm_states.STOP self._wait_for_state(self.context, instance_id, is_stopped) def _wait_for_terminate(self, instance_id): @@ -1562,7 +1563,7 @@ class CloudTestCase(test.TestCase): 'id': 0, 'root_device_name': '/dev/sdh', 'security_groups': [{'name': 'fake0'}, {'name': 'fake1'}], - 'vm_state': 'stopped', + 'vm_state': vm_states.STOP, 'instance_type': {'name': 'fake_type'}, 'kernel_id': 1, 'ramdisk_id': 2, |
