Fix an issue in storwize unit test case
Storwize driver use dict to store host site info, so the same site config will
be overrided. This patch update some typo and comments to illustrate test
purpose.
Closes-Bug:
@@ -4067,9 +4067,8 @@ class StorwizeSVCFcDriverTestCase(test.TestCase):
volume_fc,
connector)
# All the wwpns of this host are not configured.
- # TODO: This needs to be fixed. See bug #1857043
- host_site_2 = {'site1': 'ff00000000000000', # noqa
- 'site1': 'ff00000000000001'} # noqa
+ host_site_2 = {'site1': 'ff00000000000000',
+ 'site2': 'ff00000000000001'}
self.fc_driver.configuration.set_override(
'storwize_preferred_host_site', host_site_2)
self.assertRaises(exception.VolumeDriverException,
@@ -4077,9 +4076,8 @@ class StorwizeSVCFcDriverTestCase(test.TestCase):
volume_fc,
connector)
- # TODO: This needs to be fixed. See bug #1857043
- host_site_3 = {'site1': 'ffff000000000000', # noqa
- 'site1': 'ffff000000000001'} # noqa
+ # All the wwpns of this host are configured
+ host_site_3 = {'site1': 'ffff000000000000&ffff000000000001'}
self.fc_driver.configuration.set_override(
'storwize_preferred_host_site', host_site_3)
self.fc_driver.initialize_connection(volume_fc, connector)
@@ -4088,9 +4086,9 @@ class StorwizeSVCFcDriverTestCase(test.TestCase):
host_info = self.fc_driver._helpers.ssh.lshost(host=host_name)
self.assertEqual('site1', host_info[0]['site_name'])
- # TODO: This needs to be fixed. See bug #1857043
- host_site_4 = {'site2': 'ffff000000000000', # noqa
- 'site2': 'ffff000000000001'} # noqa
+ # Partial wwpns of this host are configured
+ host_site_4 = {'site1': 'ff00000000000000',
+ 'site2': 'ffff000000000001'}
self.fc_driver.configuration.set_override(
'storwize_preferred_host_site', host_site_4)
self.assertRaises(exception.InvalidConfigurationValue,
