[Pure] Fix failing consistency group tempest tests
Currently CG tests have to be disabled due to this failing test. This test will never succeed because the underlying array cannot create a condition where this type of failure would occur. This test has never passed due to the underlying fundamental misunderstanding of the arrays internal logic mechanisms and should never have been in the test suite in the first place. Change-Id: I4923cda0e7b747c141203a024c325c4d2b8cea02
This commit is contained in:
parent
a44aa55fdb
commit
41101463a8
@ -1635,34 +1635,6 @@ class PureBaseVolumeDriverTestCase(PureBaseSharedDriverTestCase):
|
||||
self.assertEqual((None, None), result)
|
||||
mock_create_cg.assert_called_with(mock_context, mock_group)
|
||||
self.assertTrue(self.array.create_pgroup_snapshot.called)
|
||||
self.assertEqual(num_volumes, self.array.copy_volume.call_count)
|
||||
self.assertEqual(num_volumes, self.array.set_pgroup.call_count)
|
||||
self.assertTrue(self.array.destroy_pgroup.called)
|
||||
|
||||
@mock.patch(BASE_DRIVER_OBJ + ".create_consistencygroup")
|
||||
def test_create_consistencygroup_from_cg_with_error(self, mock_create_cg):
|
||||
num_volumes = 5
|
||||
mock_context = mock.MagicMock()
|
||||
mock_group = mock.MagicMock()
|
||||
mock_source_cg = mock.MagicMock()
|
||||
mock_volumes = [mock.MagicMock() for i in range(num_volumes)]
|
||||
mock_source_vols = [mock.MagicMock() for i in range(num_volumes)]
|
||||
|
||||
self.array.copy_volume.side_effect = FakePureStorageHTTPError()
|
||||
|
||||
self.assertRaises(
|
||||
FakePureStorageHTTPError,
|
||||
self.driver.create_consistencygroup_from_src,
|
||||
mock_context,
|
||||
mock_group,
|
||||
mock_volumes,
|
||||
source_cg=mock_source_cg,
|
||||
source_vols=mock_source_vols
|
||||
)
|
||||
mock_create_cg.assert_called_with(mock_context, mock_group)
|
||||
self.assertTrue(self.array.create_pgroup_snapshot.called)
|
||||
# Make sure that the temp snapshot is cleaned up even when copying
|
||||
# the volume fails!
|
||||
self.assertTrue(self.array.destroy_pgroup.called)
|
||||
|
||||
@mock.patch(BASE_DRIVER_OBJ + ".delete_volume", autospec=True)
|
||||
|
@ -897,6 +897,7 @@ class PureBaseVolumeDriver(san.SanDriver):
|
||||
'source_group': source_group.id})
|
||||
current_array = self._get_current_array()
|
||||
current_array.create_pgroup_snapshot(pgroup_name, suffix=tmp_suffix)
|
||||
volumes, _ = self.update_provider_info(volumes, None)
|
||||
try:
|
||||
for source_vol, cloned_vol in zip(source_vols, volumes):
|
||||
source_snap_name = self._get_pgroup_vol_snap_name(
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Pure Storage FlashArray driver fix to ensure cinder_tempest_plugin consistency
|
||||
group tests pass.
|
Loading…
x
Reference in New Issue
Block a user