예제 #1
0
파일: test_zap.py 프로젝트: drunkard/ceph
 def test_does_not_work_after_several_tries(self, stub_call):
     os.environ['CEPH_VOLUME_WIPEFS_TRIES'] = '2'
     stub_call([('wiping /dev/sda', '', 1), ('', '', 1)])
     with pytest.raises(RuntimeError):
         zap.wipefs('/dev/sda')
예제 #2
0
파일: test_zap.py 프로젝트: drunkard/ceph
 def test_does_not_work_default_tries(self, stub_call):
     stub_call([('wiping /dev/sda', '', 1)] * 8)
     with pytest.raises(RuntimeError):
         zap.wipefs('/dev/sda')
예제 #3
0
파일: test_zap.py 프로젝트: drunkard/ceph
 def test_works_on_second_try(self, stub_call):
     os.environ['CEPH_VOLUME_WIPEFS_TRIES'] = '2'
     stub_call([('wiping /dev/sda', '', 1), ('', '', 0)])
     result = zap.wipefs('/dev/sda')
     assert result is None