Пример #1
0
 def test_slaves_are_not_found(self, makedirs, listdir, monkeypatch):
     slaves_path = makedirs('sys/block/vdo0/slaves')
     listdir(paths={'/sys/block/vdo0/slaves': slaves_path})
     monkeypatch.setattr('ceph_volume.api.lvm.os.path.exists', lambda x: True)
     result = sorted(api._vdo_slaves(['vdo0']))
     assert '/dev/mapper/vdo0' in result
     assert 'vdo0' in result
Пример #2
0
 def test_slaves_are_not_found(self, makedirs, listdir, monkeypatch):
     slaves_path = makedirs('sys/block/vdo0/slaves')
     listdir(paths={'/sys/block/vdo0/slaves': slaves_path})
     monkeypatch.setattr('ceph_volume.api.lvm.os.path.exists', lambda x, **kw: True)
     result = sorted(api._vdo_slaves(['vdo0']))
     assert '/dev/mapper/vdo0' in result
     assert 'vdo0' in result