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'
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
'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)
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):
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')