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:
Andrew Schoen 2018-08-24 15:38:14 -04:00
parent 494ece3099
commit cd63fb0df1

View File

@ -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)