mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
ceph-volume: adds unit tests for systemd.systemctl.get_running_osd_ids
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
This commit is contained in:
parent
28e454ec30
commit
7cb098b689
@ -0,0 +1,9 @@
|
||||
from ceph_volume.systemd import systemctl
|
||||
|
||||
class TestSystemctl(object):
|
||||
|
||||
def test_get_running_osd_ids(self, stub_call):
|
||||
stdout = ['Id=ceph-osd@1.service', '', 'Id=ceph-osd@2.service']
|
||||
stub_call((stdout, [], 0))
|
||||
osd_ids = systemctl.get_running_osd_ids()
|
||||
assert osd_ids == ['1', '2']
|
Loading…
Reference in New Issue
Block a user