"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "manila/tests/share/drivers/glusterfs/test_layout_volume.py" between
manila-8.1.3.tar.gz and manila-8.1.4.tar.gz

About: OpenStack Manila provides “Shared Filesystems as a service”.
The "Stein" series (maintained release).

test_layout_volume.py  (manila-8.1.3):test_layout_volume.py  (manila-8.1.4)
skipping to change at line 585 skipping to change at line 585
share['size']) share['size'])
@ddt.data(None, '', 'Eeyore') @ddt.data(None, '', 'Eeyore')
def test_delete_share(self, clone_of): def test_delete_share(self, clone_of):
self._layout._push_gluster_vol = mock.Mock() self._layout._push_gluster_vol = mock.Mock()
self._layout._wipe_gluster_vol = mock.Mock() self._layout._wipe_gluster_vol = mock.Mock()
gmgr = common.GlusterManager gmgr = common.GlusterManager
gmgr1 = gmgr(self.glusterfs_target1, self._execute, None, None) gmgr1 = gmgr(self.glusterfs_target1, self._execute, None, None)
gmgr1.set_vol_option = mock.Mock() gmgr1.set_vol_option = mock.Mock()
gmgr1.get_vol_option = mock.Mock(return_value=clone_of) gmgr1.get_vol_option = mock.Mock(return_value=clone_of)
new_vol_addr = self.glusterfs_target1
self.mock_object(self._layout, '_glustermanager', self.mock_object(self._layout, '_glustermanager',
mock.Mock(return_value=gmgr1)) mock.Mock(return_value=gmgr1))
self._layout.gluster_used_vols = set([self.glusterfs_target1]) self._layout.gluster_used_vols = set([self.glusterfs_target1])
self._layout.delete_share(self._context, self.share1) self._layout.delete_share(self._context, self.share1)
gmgr1.get_vol_option.assert_called_once_with( gmgr1.get_vol_option.assert_called_once_with(
'user.manila-cloned-from') 'user.manila-cloned-from')
self._layout._wipe_gluster_vol.assert_called_once_with(gmgr1) self._layout._wipe_gluster_vol.assert_called_once_with(gmgr1)
self.assertIn(new_vol_addr, self._layout.gluster_used_vols)
self._layout._push_gluster_vol.assert_called_once_with( self._layout._push_gluster_vol.assert_called_once_with(
self.glusterfs_target1) self.glusterfs_target1)
self._layout.private_storage.delete.assert_called_once_with( self._layout.private_storage.delete.assert_called_once_with(
self.share1['id']) self.share1['id'])
gmgr1.set_vol_option.assert_called_once_with( gmgr1.set_vol_option.assert_has_calls([
'user.manila-share', 'NONE') mock.call('user.manila-share', 'NONE'),
mock.call('nfs.disable', 'on')
])
def test_delete_share_clone(self): def test_delete_share_clone(self):
self._layout._push_gluster_vol = mock.Mock() self._layout._push_gluster_vol = mock.Mock()
self._layout._wipe_gluster_vol = mock.Mock() self._layout._wipe_gluster_vol = mock.Mock()
gmgr = common.GlusterManager gmgr = common.GlusterManager
gmgr1 = gmgr(self.glusterfs_target1, self._execute, None, None) gmgr1 = gmgr(self.glusterfs_target1, self._execute, None, None)
gmgr1.gluster_call = mock.Mock() gmgr1.gluster_call = mock.Mock()
gmgr1.get_vol_option = mock.Mock(return_value=FAKE_UUID1) gmgr1.get_vol_option = mock.Mock(return_value=FAKE_UUID1)
self.mock_object(self._layout, '_glustermanager', self.mock_object(self._layout, '_glustermanager',
mock.Mock(return_value=gmgr1)) mock.Mock(return_value=gmgr1))
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added

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