]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-7505] tests: add for archlinux
authorHacKan <hackan@gmail.com>
Fri, 26 Jan 2018 03:59:47 +0000 (00:59 -0300)
committerHacKan <hackan@gmail.com>
Fri, 26 Jan 2018 03:59:47 +0000 (00:59 -0300)
ceph_deploy/tests/test_install.py
ceph_deploy/tests/unit/hosts/test_hosts.py

index 7225f12910cf8caa0065c5b0ea9d8e1fc5dec03f..4a47f9d56c4c888f3810a09c11d9009475825d09 100644 (file)
@@ -63,6 +63,7 @@ class TestDetectComponents(object):
         self.args.install_all = True
         self.distro.is_rpm = False
         self.distro.is_deb = True
+        self.distro.is_pkgtarxz = False
         result = sorted(install.detect_components(self.args, self.distro))
         assert result == sorted([
             'ceph-osd', 'ceph-mds', 'ceph', 'ceph-mon', 'radosgw'
@@ -71,6 +72,7 @@ class TestDetectComponents(object):
     def test_install_all_with_other_options_returns_all_packages_deb(self):
         self.distro.is_rpm = False
         self.distro.is_deb = True
+        self.distro.is_pkgtarxz = False
         self.args.install_all = True
         self.args.install_mds = True
         self.args.install_mgr = True
@@ -99,6 +101,30 @@ class TestDetectComponents(object):
             'ceph-osd', 'ceph-mds', 'ceph', 'ceph-mon', 'ceph-radosgw'
         ])
 
+    def test_install_all_returns_all_packages_pkgtarxz(self):
+        self.args.install_all = True
+        self.distro.is_rpm = False
+        self.distro.is_deb = False
+        self.distro.is_pkgtarxz = True
+        result = sorted(install.detect_components(self.args, self.distro))
+        assert result == sorted([
+            'ceph',
+        ])
+
+    def test_install_all_with_other_options_returns_all_packages_pkgtarxz(self):
+        self.distro.is_rpm = False
+        self.distro.is_deb = False
+        self.distro.is_pkgtarxz = True
+        self.args.install_all = True
+        self.args.install_mds = True
+        self.args.install_mgr = True
+        self.args.install_mon = True
+        self.args.install_osd = True
+        result = sorted(install.detect_components(self.args, self.distro))
+        assert result == sorted([
+            'ceph',
+        ])
+
     def test_install_only_one_component(self):
         self.args.install_osd = True
         result = install.detect_components(self.args, self.distro)
index 81036733fc6cc98da5256e14ccfe5403c4f100a6..60e98b7acee442bf06afb01452ed4c2914447824 100644 (file)
@@ -35,6 +35,10 @@ class TestNormalized(object):
         result = hosts._normalized_distro_name('Virtuozzo Linux')
         assert result == 'virtuozzo'
 
+    def test_get_arch(self):
+        result = hosts._normalized_distro_name('Arch Linux')
+        assert result == 'arch'
+
 
 class TestNormalizeRelease(object):
 
@@ -419,3 +423,7 @@ class TestGetDistro(object):
     def test_get_virtuozzo(self):
         result = hosts._get_distro('Virtuozzo Linux')
         assert result.__name__.endswith('centos')
+
+    def test_get_arch(self):
+        result = hosts._get_distro('Arch Linux')
+        assert result.__name__.endswith('arch')