]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
some tests to excercise the code
authorAlfredo Deza <alfredo.deza@inktank.com>
Mon, 19 Aug 2013 20:55:10 +0000 (16:55 -0400)
committerAlfredo Deza <alfredo@deza.pe>
Tue, 20 Aug 2013 15:45:50 +0000 (11:45 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/tests/unit/hosts/test_hosts.py

index ac087c04466fcf745d72c52d58fe2509bbfd3124..4b67f0472cf4395fa739489bbd5cb077bf243248 100644 (file)
@@ -53,3 +53,19 @@ class TestGetDistro(object):
     def test_get_fallback(self):
         result = hosts._get_distro('Solaris', 'Debian')
         assert result.__name__.endswith('debian')
+
+
+class TestDetectPackageManagers(object):
+
+    def test_centos_is_yum(self):
+        result = hosts.detect_package_manager('centos')
+        assert result is 'yum'
+
+    def test_scientific_is_yum(self):
+        result = hosts.detect_package_manager('scientific')
+        assert result is 'yum'
+
+    def test_redhat_is_yum(self):
+        result = hosts.detect_package_manager('redhat')
+        assert result is 'yum'
+