]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix LVM migrate_volume tests
authorgit-harry <git-harry@live.co.uk>
Thu, 6 Feb 2014 16:16:57 +0000 (16:16 +0000)
committergit-harry <git-harry@live.co.uk>
Thu, 6 Feb 2014 16:39:14 +0000 (16:39 +0000)
In cinder/tests/test_volume.py the following tests fail to correctly
test the functionality.

LVMISCSIVolumeDriverTestCase.test_lvm_migrate_volume_diff_driver
LVMISCSIVolumeDriverTestCase.test_lvm_migrate_volume_diff_host

The location_info is incorrect, it needs to be 5 sections separated by
colons otherwise they fail due to bad location info.

Change-Id: Ie7ceaba6b35c0aedb47cae0db5c60cc489e94c49
Closes-Bug: #1277155

cinder/tests/test_volume.py

index caeea99bd9e57f7f6b334a9d6f12bddfe5dbd603..430da471813caf2f6246c336a324a569643ac57d 100644 (file)
@@ -2658,7 +2658,7 @@ class LVMISCSIVolumeDriverTestCase(DriverTestCase):
         self.assertIsNone(model_update)
 
     def test_lvm_migrate_volume_diff_driver(self):
-        capabilities = {'location_info': 'FooDriver:foo:bar'}
+        capabilities = {'location_info': 'FooDriver:foo:bar:default:0'}
         host = {'capabilities': capabilities}
         vol = {'name': 'test', 'id': 1, 'size': 1, 'status': 'available'}
         moved, model_update = self.volume.driver.migrate_volume(self.context,
@@ -2667,7 +2667,7 @@ class LVMISCSIVolumeDriverTestCase(DriverTestCase):
         self.assertIsNone(model_update)
 
     def test_lvm_migrate_volume_diff_host(self):
-        capabilities = {'location_info': 'LVMVolumeDriver:foo:bar'}
+        capabilities = {'location_info': 'LVMVolumeDriver:foo:bar:default:0'}
         host = {'capabilities': capabilities}
         vol = {'name': 'test', 'id': 1, 'size': 1, 'status': 'available'}
         moved, model_update = self.volume.driver.migrate_volume(self.context,