From: David Disseldorp Date: Mon, 29 Jun 2015 16:46:19 +0000 (+0200) Subject: Add tests for component to SUSE package mapping X-Git-Tag: v1.5.26~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d5049edc8567cebf936bb07847906c5400f9a6d9;p=ceph-deploy.git Add tests for component to SUSE package mapping Signed-off-by: David Disseldorp --- diff --git a/ceph_deploy/tests/unit/hosts/test_suse.py b/ceph_deploy/tests/unit/hosts/test_suse.py index bd72d22..841ec06 100644 --- a/ceph_deploy/tests/unit/hosts/test_suse.py +++ b/ceph_deploy/tests/unit/hosts/test_suse.py @@ -1,4 +1,5 @@ from ceph_deploy.hosts import suse +from ceph_deploy.hosts.suse.install import map_components class TestSuseInit(object): def setup(self): @@ -23,3 +24,16 @@ class TestSuseInit(object): self.host.release = '13.1' init_type = self.host.choose_init() assert init_type == "systemd" + +class TestSuseMapComponents(object): + def test_valid(self): + pkgs = map_components(['ceph-osd', 'ceph-common', 'ceph-radosgw']) + assert 'ceph' in pkgs + assert 'ceph-common' in pkgs + assert 'ceph-radosgw' in pkgs + assert 'ceph-osd' not in pkgs + + def test_invalid(self): + pkgs = map_components(['not-provided', 'ceph-mon']) + assert 'not-provided' not in pkgs + assert 'ceph' in pkgs