mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
ceph-volume: reset sys_info.devices in the device_info fixture
In certain environments it was noticed that when running the full test suite sys_info.devices would get populated correctly from previous tests. This caused the tests to fail because they did not have the expected mock data. Signed-off-by: Andrew Schoen <aschoen@redhat.com>
This commit is contained in:
parent
494ece3099
commit
cd63fb0df1
@ -155,6 +155,7 @@ def device_info(monkeypatch):
|
||||
devices = devices if devices else {}
|
||||
lsblk = lsblk if lsblk else {}
|
||||
lv = Factory(**lv) if lv else None
|
||||
monkeypatch.setattr("ceph_volume.sys_info.devices", {})
|
||||
monkeypatch.setattr("ceph_volume.util.device.disk.get_devices", lambda: devices)
|
||||
monkeypatch.setattr("ceph_volume.util.device.lvm.get_lv_from_argument", lambda path: lv)
|
||||
monkeypatch.setattr("ceph_volume.util.device.disk.lsblk", lambda path: lsblk)
|
||||
|
Loading…
Reference in New Issue
Block a user