correct volume ids for ec2
This commit is contained in:
@@ -126,8 +126,9 @@ class CloudTestCase(test.TestCase):
|
||||
vol2 = db.volume_create(self.context, {})
|
||||
result = self.cloud.describe_volumes(self.context)
|
||||
self.assertEqual(len(result['volumeSet']), 2)
|
||||
result = self.cloud.describe_volumes(self.context,
|
||||
volume_id=[cloud.id_to_ec2_id(vol2['id'], 'vol-%s')])
|
||||
result = self.cloud.describe_volumes(
|
||||
self.context,
|
||||
volume_id=[cloud.id_to_ec2_id(vol2['id'], 'vol-%s')])
|
||||
self.assertEqual(len(result['volumeSet']), 1)
|
||||
self.assertEqual(result['volumeSet'][0]['volumeId'], vol2['id'])
|
||||
db.volume_destroy(self.context, vol1['id'])
|
||||
@@ -385,7 +386,8 @@ class CloudTestCase(test.TestCase):
|
||||
|
||||
def test_update_of_volume_display_fields(self):
|
||||
vol = db.volume_create(self.context, {})
|
||||
self.cloud.update_volume(self.context, id_to_ec2_id(vol['id'], 'vol-%s'),
|
||||
self.cloud.update_volume(self.context,
|
||||
id_to_ec2_id(vol['id'], 'vol-%s'),
|
||||
display_name='c00l v0lum3')
|
||||
vol = db.volume_get(self.context, vol['id'])
|
||||
self.assertEqual('c00l v0lum3', vol['display_name'])
|
||||
@@ -393,7 +395,8 @@ class CloudTestCase(test.TestCase):
|
||||
|
||||
def test_update_of_volume_wont_update_private_fields(self):
|
||||
vol = db.volume_create(self.context, {})
|
||||
self.cloud.update_volume(self.context, id_to_ec2_id(vol['id'], 'vol-%s'),
|
||||
self.cloud.update_volume(self.context,
|
||||
id_to_ec2_id(vol['id'], 'vol-%s'),
|
||||
mountpoint='/not/here')
|
||||
vol = db.volume_get(self.context, vol['id'])
|
||||
self.assertEqual(None, vol['mountpoint'])
|
||||
|
Reference in New Issue
Block a user