blob: c14778d41b5458922ae3db9e903b434856026fe8 [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',
8 ['ceph osd tree | grep up'],
9 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])