"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_provision.py" between
cinder-15.0.1.tar.gz and cinder-15.1.0.tar.gz

About: OpenStack Cinder (Core Service: Block Storage) provides persistent block storage to running instances. Its pluggable driver architecture facilitates the creation and management of block storage devices.
The "Train" series (latest release).

test_powermax_provision.py  (cinder-15.0.1):test_powermax_provision.py  (cinder-15.1.0)
skipping to change at line 456 skipping to change at line 456
'create_group_replica') as mock_create_replica: 'create_group_replica') as mock_create_replica:
self.provision.create_group_replica( self.provision.create_group_replica(
array, source_group, snap_name, extra_specs) array, source_group, snap_name, extra_specs)
mock_create_replica.assert_called_once_with( mock_create_replica.assert_called_once_with(
array, source_group, snap_name, extra_specs) array, source_group, snap_name, extra_specs)
def test_delete_group_replica(self): def test_delete_group_replica(self):
array = self.data.array array = self.data.array
snap_name = self.data.group_snapshot_name snap_name = self.data.group_snapshot_name
source_group_name = self.data.storagegroup_name_source source_group_name = self.data.storagegroup_name_source
extra_specs = self.data.extra_specs
src_dev_ids = [self.data.device_id]
with mock.patch.object( with mock.patch.object(
self.provision, self.provision,
'delete_group_replica') as mock_delete_replica: 'delete_group_replica') as mock_delete_replica:
self.provision.delete_group_replica( self.provision.delete_group_replica(
array, snap_name, source_group_name, src_dev_ids, extra_specs) array, snap_name, source_group_name)
mock_delete_replica.assert_called_once_with( mock_delete_replica.assert_called_once_with(
array, snap_name, source_group_name, src_dev_ids, extra_specs) array, snap_name, source_group_name)
@mock.patch.object(rest.PowerMaxRest,
'get_storagegroup_snap_generation_list',
side_effect=[['0', '3', '1', '2'],
['0', '1'], ['0'], list()])
def test_delete_group_replica_side_effect(self, mock_list):
array = self.data.array
snap_name = self.data.group_snapshot_name
source_group_name = self.data.storagegroup_name_source
with mock.patch.object(
self.rest, 'delete_storagegroup_snap') as mock_del:
self.provision.delete_group_replica(
array, snap_name, source_group_name)
self.assertEqual(4, mock_del.call_count)
mock_del.reset_mock()
self.provision.delete_group_replica(
array, snap_name, source_group_name)
self.assertEqual(2, mock_del.call_count)
mock_del.reset_mock()
self.provision.delete_group_replica(
array, snap_name, source_group_name)
self.assertEqual(1, mock_del.call_count)
mock_del.reset_mock()
self.provision.delete_group_replica(
array, snap_name, source_group_name)
mock_del.assert_not_called()
def test_link_and_break_replica(self): def test_link_and_break_replica(self):
array = self.data.array array = self.data.array
source_group_name = self.data.storagegroup_name_source source_group_name = self.data.storagegroup_name_source
target_group_name = self.data.target_group_name target_group_name = self.data.target_group_name
snap_name = self.data.group_snapshot_name snap_name = self.data.group_snapshot_name
extra_specs = self.data.extra_specs extra_specs = self.data.extra_specs
delete_snapshot = False delete_snapshot = False
with mock.patch.object( with mock.patch.object(
self.provision, self.provision,
 End of changes. 3 change blocks. 
4 lines changed or deleted 28 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)