Oleksii Zhurba | 28dea43 | 2017-10-05 16:48:16 -0500 | [diff] [blame^] | 1 | import pytest |
Oleksii Zhurba | a10927b | 2017-09-27 22:09:23 +0000 | [diff] [blame] | 2 | |
| 3 | |
| 4 | def test_check_ceph_osd(local_salt_client): |
Oleksii Zhurba | 28dea43 | 2017-10-05 16:48:16 -0500 | [diff] [blame^] | 5 | 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 Zhurba | a10927b | 2017-09-27 22:09:23 +0000 | [diff] [blame] | 12 | assert not osd_fail.values()[0], \ |
| 13 | "Some osds are in down state or ceph is not found".format( |
| 14 | osd_fail.values()[0]) |