From dc02810c5dc64ca48a163645588ea6a60367227a Mon Sep 17 00:00:00 2001 From: git-harry Date: Thu, 6 Feb 2014 16:16:57 +0000 Subject: [PATCH] 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 --- cinder/tests/test_volume.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, -- 2.45.2