Skip to content

Commit

Permalink
ceph-volume: adds unit tests for systemd.systemctl.get_running_osd_ids
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Schoen <[email protected]>
  • Loading branch information
andrewschoen committed Mar 8, 2019
1 parent 28e454e commit 7cb098b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ceph-volume/ceph_volume/tests/systemd/test_systemctl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from ceph_volume.systemd import systemctl

class TestSystemctl(object):

def test_get_running_osd_ids(self, stub_call):
stdout = ['[email protected]', '', '[email protected]']
stub_call((stdout, [], 0))
osd_ids = systemctl.get_running_osd_ids()
assert osd_ids == ['1', '2']

0 comments on commit 7cb098b

Please sign in to comment.