From: git-harry Date: Thu, 6 Feb 2014 16:16:57 +0000 (+0000) Subject: Fix LVM migrate_volume tests X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=dc02810c5dc64ca48a163645588ea6a60367227a;p=openstack-build%2Fcinder-build.git Fix LVM migrate_volume tests 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 --- diff --git a/cinder/tests/test_volume.py b/cinder/tests/test_volume.py index caeea99bd..430da4718 100644 --- a/cinder/tests/test_volume.py +++ b/cinder/tests/test_volume.py @@ -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,