diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-05-30 22:44:43 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-05-30 22:44:43 +0000 |
| commit | ed0b56c50dba876a6cdca02482dbf1a117a91311 (patch) | |
| tree | 73acc7baec183c10cfdb94ef641cfbad199e688f /nova/tests | |
| parent | 57aa58630d2362a6753eb861c8afd9abb682db3b (diff) | |
| parent | 0ce533e0e194741b6ade7eed12c107628d0e6d3d (diff) | |
Merge "fixing issue with db.volume_update not returning the volume_ref"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/ec2/test_cloud.py | 8 | ||||
| -rw-r--r-- | nova/tests/test_volume.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py index 3135364ec..c9080c0e3 100644 --- a/nova/tests/api/ec2/test_cloud.py +++ b/nova/tests/api/ec2/test_cloud.py @@ -623,7 +623,7 @@ class CloudTestCase(test.TestCase): self.assertEqual(result['volumeSet'][0]['availabilityZone'], availabilityZone) - db.volume_destroy(self.context, ec2utils.ec2_id_to_id(volume_id)) + db.volume_destroy(self.context, ec2utils.ec2_vol_id_to_uuid(volume_id)) def test_create_volume_from_snapshot(self): """Makes sure create_volume works when we specify a snapshot.""" @@ -640,7 +640,7 @@ class CloudTestCase(test.TestCase): self.assertEqual(len(result['volumeSet']), 2) self.assertEqual(result['volumeSet'][1]['volumeId'], volume_id) - db.volume_destroy(self.context, ec2utils.ec2_id_to_id(volume_id)) + db.volume_destroy(self.context, ec2utils.ec2_vol_id_to_uuid(volume_id)) db.snapshot_destroy(self.context, snap['id']) db.volume_destroy(self.context, vol['id']) @@ -2083,7 +2083,7 @@ class CloudTestCase(test.TestCase): 'snapshot_id': snapshot2_id, 'delete_on_termination': True}]} ec2_instance_id = self._run_instance(**kwargs) - instance_id = ec2utils.ec2_id_to_id(ec2_instance_id) + instance_id = ec2utils.ec2_vol_id_to_uuid(ec2_instance_id) instance_uuid = ec2utils.ec2_instance_id_to_uuid(self.context, ec2_instance_id) @@ -2122,8 +2122,6 @@ class CloudTestCase(test.TestCase): for snapshot_id in (ec2_snapshot1_id, ec2_snapshot2_id): self.cloud.delete_snapshot(self.context, snapshot_id) - db.volume_destroy(self.context, vol['id']) - def test_create_image(self): """Make sure that CreateImage works""" # enforce periodic tasks run in short time to avoid wait for 60s. diff --git a/nova/tests/test_volume.py b/nova/tests/test_volume.py index f9b54badc..2909b51f7 100644 --- a/nova/tests/test_volume.py +++ b/nova/tests/test_volume.py @@ -395,6 +395,8 @@ class VolumeTestCase(test.TestCase): self.assertEquals(len(test_notifier.NOTIFICATIONS), 2) msg = test_notifier.NOTIFICATIONS[0] self.assertEquals(msg['event_type'], 'volume.create.start') + payload = msg['payload'] + self.assertEquals(payload['status'], 'creating') msg = test_notifier.NOTIFICATIONS[1] self.assertEquals(msg['priority'], 'INFO') self.assertEquals(msg['event_type'], 'volume.create.end') @@ -402,7 +404,7 @@ class VolumeTestCase(test.TestCase): self.assertEquals(payload['tenant_id'], volume['project_id']) self.assertEquals(payload['user_id'], volume['user_id']) self.assertEquals(payload['volume_id'], volume['id']) - self.assertEquals(payload['status'], 'creating') + self.assertEquals(payload['status'], 'available') self.assertEquals(payload['size'], volume['size']) self.assertTrue('display_name' in payload) self.assertTrue('snapshot_id' in payload) |
