Browse Source

Delete temporary file after media ejection

Story: 2008742
Task: 42096

Change-Id: If1a4fe6b08a3845aa2217e22d773855656087989
changes/14/782514/3
François Rigault 8 months ago
parent
commit
83fa744fbb
  1. 2
      sushy_tools/emulator/resources/vmedia.py
  2. 1
      sushy_tools/tests/unit/emulator/resources/test_vmedia.py

2
sushy_tools/emulator/resources/vmedia.py

@ -188,7 +188,7 @@ class StaticDriver(base.DriverBase):
device_info['Image'] = local_file
device_info['Inserted'] = inserted
device_info['WriteProtected'] = write_protected
device_info['_local_file_path'] = local_file_path
device_info['_local_file'] = local_file_path
self._devices.update({(identity, device): device_info})

1
sushy_tools/tests/unit/emulator/resources/test_vmedia.py

@ -105,6 +105,7 @@ class StaticDriverTestCase(base.BaseTestCase):
self.assertEqual('fish.iso', device_info['Image'])
self.assertTrue(device_info['Inserted'])
self.assertFalse(device_info['WriteProtected'])
self.assertEqual(local_file, device_info['_local_file'])
@mock.patch.object(vmedia.StaticDriver, '_get_device', autospec=True)
@mock.patch.object(builtins, 'open', autospec=True)

Loading…
Cancel
Save