Skip to content

Commit

Permalink
[RM-13087] Fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
  • Loading branch information
Travis Rhoden committed Sep 14, 2015
1 parent 3feb498 commit 7f723a8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ceph_deploy/tests/unit/hosts/test_suse.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
from mock import MagicMock

from ceph_deploy.hosts import suse
from ceph_deploy.hosts.suse.install import map_components, NON_SPLIT_PACKAGES

class TestSuseInit(object):
def setup(self):
self.host = suse
self.host.conn = MagicMock()

def test_choose_init_default(self):
self.host.release = None
init_type = self.host.choose_init(self.host)
assert init_type == "sysvinit"
assert init_type.name == "sysvinit"

def test_choose_init_SLE_11(self):
self.host.release = '11'
init_type = self.host.choose_init(self.host)
assert init_type == "sysvinit"
assert init_type.name == "sysvinit"

def test_choose_init_SLE_12(self):
self.host.release = '12'
init_type = self.host.choose_init(self.host)
assert init_type == "systemd"
assert init_type.name == "systemd"

def test_choose_init_openSUSE_13_1(self):
self.host.release = '13.1'
init_type = self.host.choose_init(self.host)
assert init_type == "systemd"
assert init_type.name == "systemd"

class TestSuseMapComponents(object):
def test_valid(self):
Expand Down

0 comments on commit 7f723a8

Please sign in to comment.