From: Owen Synge Date: Fri, 11 Jul 2014 16:21:16 +0000 (+0200) Subject: adds 4 very basic tests for init type X-Git-Tag: v1.5.9~4^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d74906ce5110ebc70b09c6c2691a7531ba076c94;p=ceph-deploy.git adds 4 very basic tests for init type --- diff --git a/ceph_deploy/tests/unit/hosts/test_suse.py b/ceph_deploy/tests/unit/hosts/test_suse.py new file mode 100644 index 0000000..c0e19fe --- /dev/null +++ b/ceph_deploy/tests/unit/hosts/test_suse.py @@ -0,0 +1,25 @@ +from ceph_deploy.hosts import suse + +class TestSuseInit(object): + def setup(self): + self.host = suse + + def test_choose_init_default(self): + self.host.release = '11' + init_type = self.host.choose_init() + assert ( init_type == "sysvinit") + + def test_choose_init_SLE_11(self): + self.host.release = '11' + init_type = self.host.choose_init() + assert ( init_type == "sysvinit") + + def test_choose_init_SLE_12(self): + self.host.release = '12' + init_type = self.host.choose_init() + assert ( init_type == "systemd") + + def test_choose_init_openSUSE_13.1(self): + self.host.release = '13.1' + init_type = self.host.choose_init() + assert ( init_type == "systemd")