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>
(cherry picked from commit
cd63fb0df11c43b429c3025a6be2b8bba10d6e8d)
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)