summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-07-25 20:33:20 +0000
committerVishvananda Ishaya <vishvananda@gmail.com>2011-07-25 20:33:20 +0000
commit67ccc98d6a0d9e8618889fd9fa398a39735d044a (patch)
treee760448bd00c73c2f7a1543cdea2aaa981580ccb /nova
parent9980a8a90c73f95440a760ae91bafc5b1f308931 (diff)
add a simple broken test to verify the bug
Diffstat (limited to 'nova')
-rw-r--r--nova/tests/test_cloud.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py
index d71a03aff..87edaac36 100644
--- a/nova/tests/test_cloud.py
+++ b/nova/tests/test_cloud.py
@@ -518,6 +518,21 @@ class CloudTestCase(test.TestCase):
self._wait_for_running(ec2_instance_id)
return ec2_instance_id
+ def test_rescue_unrescue_instance(self):
+ instance_id = self._run_instance(
+ image_id='ami-1',
+ instance_type=FLAGS.default_instance_type,
+ max_count=1)
+ self.cloud.rescue_instance(context=self.context,
+ instance_id=instance_id)
+ # NOTE(vish): This currently does no validation, it simply makes sure
+ # that the code path doesn't throw an exception.
+ self.cloud.unrescue_instance(context=self.context,
+ instance_id=instance_id)
+ # TODO(soren): We need this until we can stop polling in the rpc code
+ # for unit tests.
+ self.cloud.terminate_instances(self.context, [instance_id])
+
def test_console_output(self):
instance_id = self._run_instance(
image_id='ami-1',