]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume tests update is_mapper unit test when zapping
authorAlfredo Deza <adeza@redhat.com>
Wed, 28 Nov 2018 18:46:05 +0000 (13:46 -0500)
committerAlfredo Deza <adeza@redhat.com>
Fri, 30 Nov 2018 19:06:36 +0000 (14:06 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 830cd7d638b70e97723eb41f0d33f6a60e3ece32)

src/ceph-volume/ceph_volume/tests/devices/test_zap.py

index 493c74c509c733be891712414f5a1f95cb30e20a..6333e3a4ea1d7ab0b6c3f82774294a053e26d296 100644 (file)
@@ -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()