]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: reset sys_info.devices in the device_info fixture 23807/head
authorAndrew Schoen <aschoen@redhat.com>
Fri, 24 Aug 2018 19:38:14 +0000 (15:38 -0400)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 29 Aug 2018 18:42:23 +0000 (13:42 -0500)
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)

src/ceph-volume/ceph_volume/tests/conftest.py

index bdbe817f16f0e67226c60f13f1eb250729190710..65279dc9bdf79c931213115e48848deaf470b689 100644 (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)