]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
Add tests for component to SUSE package mapping 324/head
authorDavid Disseldorp <ddiss@suse.de>
Mon, 29 Jun 2015 16:46:19 +0000 (18:46 +0200)
committerDavid Disseldorp <ddiss@suse.de>
Fri, 10 Jul 2015 10:45:04 +0000 (12:45 +0200)
Signed-off-by: David Disseldorp <ddiss@suse.de>
ceph_deploy/tests/unit/hosts/test_suse.py

index bd72d229b4cd733417cbcfbf75e083eb6c8da742..841ec06cf5f5a37e9576fc03cd885f8b5a81b688 100644 (file)
@@ -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