blob: 6969d8ae73ace02fc835f07dc779ea4cff379f2e [file] [log] [blame]
Oleksii Zhurba28dea432017-10-05 16:48:16 -05001import pytest
Oleksii Zhurbaa10927b2017-09-27 22:09:23 +00002
3
4def test_check_ceph_osd(local_salt_client):
Oleksii Zhurba28dea432017-10-05 16:48:16 -05005 osd_fail = local_salt_client.cmd(
6 'ceph:osd',
7 'cmd.run',
Oleksii Zhurba0ee18142017-10-05 17:15:05 -05008 ['ceph osd tree | grep down'],
Oleksii Zhurba28dea432017-10-05 16:48:16 -05009 expr_form='pillar')
10 if not osd_fail:
11 pytest.skip("Ceph is not found on this environment")
Oleksii Zhurbaa10927b2017-09-27 22:09:23 +000012 assert not osd_fail.values()[0], \
13 "Some osds are in down state or ceph is not found".format(
14 osd_fail.values()[0])