From ebf0c510bb568ef3b75c7647bd727aefef183172 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 28 Nov 2018 13:46:05 -0500 Subject: [PATCH] ceph-volume tests update is_mapper unit test when zapping Signed-off-by: Alfredo Deza (cherry picked from commit 830cd7d638b70e97723eb41f0d33f6a60e3ece32) --- src/ceph-volume/ceph_volume/tests/devices/test_zap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ceph-volume/ceph_volume/tests/devices/test_zap.py b/src/ceph-volume/ceph_volume/tests/devices/test_zap.py index 493c74c509c73..6333e3a4ea1d7 100644 --- a/src/ceph-volume/ceph_volume/tests/devices/test_zap.py +++ b/src/ceph-volume/ceph_volume/tests/devices/test_zap.py @@ -19,7 +19,9 @@ class TestZap(object): '/dev/mapper/foo', '/dev/dm-0', ]) - def test_can_not_zap_mapper_device(self, capsys, is_root, device_name): + def test_can_not_zap_mapper_device(self, monkeypatch, device_info, capsys, is_root, device_name): + monkeypatch.setattr('os.path.exists', lambda x: True) + device_info() with pytest.raises(SystemExit): lvm.zap.Zap(argv=[device_name]).main() stdout, stderr = capsys.readouterr() -- 2.39.5