diff options
| author | Josh Kearney <josh@jk0.org> | 2011-11-14 15:30:14 -0600 |
|---|---|---|
| committer | Josh Kearney <josh@jk0.org> | 2011-11-14 15:30:23 -0600 |
| commit | e105c53e67febefc0ae7e78baf53020d2b29c298 (patch) | |
| tree | 9d3a6e7372010a18af23e27d142eb78043973a03 /nova/tests | |
| parent | d9dd8f2fd395ad02e536d8054b0615520771b93e (diff) | |
Log the URL to an image_ref and not just the ID.
Change-Id: Iaae6b969d9ef3cd0f50dd3297d4b0bb51f61f5c9
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_compute.py | 9 | ||||
| -rw-r--r-- | nova/tests/test_compute_utils.py | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index f95d6cad3..b641e8e71 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -426,7 +426,8 @@ class ComputeTestCase(BaseTestCase): self.assertTrue('created_at' in payload) self.assertTrue('launched_at' in payload) self.assertTrue(payload['launched_at']) - self.assertEquals(payload['image_ref'], '1') + image_ref_url = "%s/images/1" % utils.generate_glance_url() + self.assertEquals(payload['image_ref_url'], image_ref_url) self.compute.terminate_instance(self.context, instance_id) def test_terminate_usage_notification(self): @@ -455,7 +456,8 @@ class ComputeTestCase(BaseTestCase): self.assertTrue('display_name' in payload) self.assertTrue('created_at' in payload) self.assertTrue('launched_at' in payload) - self.assertEquals(payload['image_ref'], '1') + image_ref_url = "%s/images/1" % utils.generate_glance_url() + self.assertEquals(payload['image_ref_url'], image_ref_url) def test_run_instance_existing(self): """Ensure failure when running an instance that already exists""" @@ -582,7 +584,8 @@ class ComputeTestCase(BaseTestCase): self.assertTrue('display_name' in payload) self.assertTrue('created_at' in payload) self.assertTrue('launched_at' in payload) - self.assertEquals(payload['image_ref'], '1') + image_ref_url = "%s/images/1" % utils.generate_glance_url() + self.assertEquals(payload['image_ref_url'], image_ref_url) self.compute.terminate_instance(context, instance_id) def test_resize_instance(self): diff --git a/nova/tests/test_compute_utils.py b/nova/tests/test_compute_utils.py index 12b98aa0b..a9c149108 100644 --- a/nova/tests/test_compute_utils.py +++ b/nova/tests/test_compute_utils.py @@ -91,5 +91,6 @@ class UsageInfoTestCase(test.TestCase): 'audit_period_ending'): self.assertTrue(attr in payload, msg="Key %s not in payload" % attr) - self.assertEquals(payload['image_ref'], '1') + image_ref_url = "%s/images/1" % utils.generate_glance_url() + self.assertEquals(payload['image_ref_url'], image_ref_url) self.compute.terminate_instance(self.context, instance_id) |
