]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: Update tests according to `ceph-config` role implementation
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 9 Aug 2017 12:57:39 +0000 (14:57 +0200)
committerSébastien Han <seb@redhat.com>
Thu, 24 Aug 2017 09:33:02 +0000 (11:33 +0200)
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
tests/functional/tests/mon/test_mons.py
tests/functional/tests/test_install.py

index c13c8c5ddb6d8beff1df8427ff14f35eab8a79a9..b061e4b6a45c28bf36e91a376676afccce68abee 100644 (file)
@@ -28,6 +28,15 @@ class TestMons(object):
         output = host.check_output(cmd)
         assert output.strip().startswith("cluster")
 
+    def test_ceph_config_has_inital_members_line(self, node, File):
+        assert File(node["conf_path"]).contains("^mon initial members = .*$")
+
+    def test_initial_members_line_has_correct_value(self, node, File):
+        mons = ",".join("ceph-%s" % host
+                        for host in node["vars"]["groups"]["mons"])
+        line = "mon initial members = {}".format(mons)
+        assert File(node["conf_path"]).contains(line)
+
 
 class TestOSDs(object):
 
index 304d590a33c4d52cc5f284842b2d04b5ac443a01..33a8205b25610f78ef1db31242405d4db180bbcc 100644 (file)
@@ -22,17 +22,8 @@ class TestInstall(object):
 
 class TestCephConf(object):
 
-    def test_ceph_config_has_inital_members_line(self, node, host):
-        assert host.file(node["conf_path"]).contains("^mon initial members = .*$")
-
-    def test_initial_members_line_has_correct_value(self, node, host):
-        mons = ",".join("ceph-%s" % host
-                        for host in node["vars"]["groups"]["mons"])
-        line = "mon initial members = {}".format(mons)
-        assert host.file(node["conf_path"]).contains(line)
-
-    def test_ceph_config_has_mon_host_line(self, node, host):
-        assert host.file(node["conf_path"]).contains("^mon host = .*$")
+    def test_ceph_config_has_mon_host_line(self, node, File):
+        assert File(node["conf_path"]).contains("^mon host = .*$")
 
     def test_mon_host_line_has_correct_value(self, node, host):
         mon_ips = []