Tests: Fix mock for vzstorage remotefs

This needs to be added to prevent writing a file
during unit tests.

Closes-Bug: #1659295

Change-Id: Ic03d1254b3187785f276e4f745f3ba230078e017
This commit is contained in:
Eric Harney 2017-01-25 11:09:44 -05:00
parent d85f061a12
commit c0bce8cdf5
1 changed files with 3 additions and 1 deletions

View File

@ -315,7 +315,9 @@ class VZStorageTestCase(test.TestCase):
self._FAKE_VOLUME_PATH)
drv._delete.assert_any_call(fake_vol_info)
def test_delete_snapshot_ploop(self):
@mock.patch('cinder.volume.drivers.remotefs.RemoteFSSnapDriverBase.'
'_write_info_file')
def test_delete_snapshot_ploop(self, _mock_write_info_file):
fake_snap_info = {
'active': self._FAKE_VOLUME_NAME,
self._FAKE_SNAPSHOT_ID: self._FAKE_SNAPSHOT_PATH,