]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
adds 4 very basic tests for init type
authorOwen Synge <osynge@suse.com>
Fri, 11 Jul 2014 16:21:16 +0000 (18:21 +0200)
committerOwen Synge <osynge@suse.com>
Fri, 11 Jul 2014 16:21:16 +0000 (18:21 +0200)
ceph_deploy/tests/unit/hosts/test_suse.py [new file with mode: 0644]

diff --git a/ceph_deploy/tests/unit/hosts/test_suse.py b/ceph_deploy/tests/unit/hosts/test_suse.py
new file mode 100644 (file)
index 0000000..c0e19fe
--- /dev/null
@@ -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")