summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorTodd Willey <todd@ansolabs.com>2011-01-13 18:23:18 -0500
committerTodd Willey <todd@ansolabs.com>2011-01-13 18:23:18 -0500
commit16a8f4a98973ae5e5541f2b43db4dc36eaed2647 (patch)
treeb7a3226c73d4b2bc4ab9473688138aa2e2cbdd7f /nova/tests
parent73e49ac35cc8b0a97dd7cd9b39cf00cd15b1d9dd (diff)
parent24e6372891be1b6dd81de0af89ece88f256a32e9 (diff)
downloadnova-16a8f4a98973ae5e5541f2b43db4dc36eaed2647.tar.gz
nova-16a8f4a98973ae5e5541f2b43db4dc36eaed2647.tar.xz
nova-16a8f4a98973ae5e5541f2b43db4dc36eaed2647.zip
Merge trunk and fix how nova-combined works with paste.deploy.
Refactor some of the bits of nova-api into nova/wsgi for working with paste, for a little bit of de-duplication between nova-api and nova-combined. Makes a cleaner interface for how paste configs can set flags.
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_cloud.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py
index fdacb04f6..2e350cd5a 100644
--- a/nova/tests/test_cloud.py
+++ b/nova/tests/test_cloud.py
@@ -126,10 +126,13 @@ class CloudTestCase(test.TestCase):
vol2 = db.volume_create(self.context, {})
result = self.cloud.describe_volumes(self.context)
self.assertEqual(len(result['volumeSet']), 2)
+ volume_id = cloud.id_to_ec2_id(vol2['id'], 'vol-%08x')
result = self.cloud.describe_volumes(self.context,
- volume_id=[vol2['id']])
+ volume_id=[volume_id])
self.assertEqual(len(result['volumeSet']), 1)
- self.assertEqual(result['volumeSet'][0]['volumeId'], vol2['id'])
+ self.assertEqual(
+ cloud.ec2_id_to_id(result['volumeSet'][0]['volumeId']),
+ vol2['id'])
db.volume_destroy(self.context, vol1['id'])
db.volume_destroy(self.context, vol2['id'])
@@ -385,7 +388,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, vol['id'],
+ self.cloud.update_volume(self.context,
+ cloud.id_to_ec2_id(vol['id'], 'vol-%08x'),
display_name='c00l v0lum3')
vol = db.volume_get(self.context, vol['id'])
self.assertEqual('c00l v0lum3', vol['display_name'])
@@ -393,8 +397,9 @@ 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, vol['id'],
- mountpoint='/not/here')
+ self.cloud.update_volume(self.context,
+ cloud.id_to_ec2_id(vol['id'], 'vol-%08x'),
+ mountpoint='/not/here')
vol = db.volume_get(self.context, vol['id'])
self.assertEqual(None, vol['mountpoint'])
db.volume_destroy(self.context, vol['id'])