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 <aschoen@redhat.com>
(cherry picked from commit 7cb098b)
  • Loading branch information
andrewschoen committed Mar 8, 2019
1 parent 4ed9a28 commit f68283e
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
@@ -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']

0 comments on commit f68283e

Please sign in to comment.