From cd63fb0df11c43b429c3025a6be2b8bba10d6e8d Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Fri, 24 Aug 2018 15:38:14 -0400 Subject: [PATCH] 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 --- src/ceph-volume/ceph_volume/tests/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ceph-volume/ceph_volume/tests/conftest.py b/src/ceph-volume/ceph_volume/tests/conftest.py index bdbe817f16f0e..65279dc9bdf79 100644 --- a/src/ceph-volume/ceph_volume/tests/conftest.py +++ b/src/ceph-volume/ceph_volume/tests/conftest.py @@ -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) -- 2.39.5