From: Guillaume Abrioux Date: Wed, 9 Aug 2017 12:57:39 +0000 (+0200) Subject: tests: Update tests according to `ceph-config` role implementation X-Git-Tag: v3.0.0rc4~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b264bfece0b88eca8db95cb997c51df680d8f5fc;p=ceph-ansible.git tests: Update tests according to `ceph-config` role implementation Signed-off-by: Guillaume Abrioux --- diff --git a/tests/functional/tests/mon/test_mons.py b/tests/functional/tests/mon/test_mons.py index c13c8c5dd..b061e4b6a 100644 --- a/tests/functional/tests/mon/test_mons.py +++ b/tests/functional/tests/mon/test_mons.py @@ -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): diff --git a/tests/functional/tests/test_install.py b/tests/functional/tests/test_install.py index 304d590a3..33a8205b2 100644 --- a/tests/functional/tests/test_install.py +++ b/tests/functional/tests/test_install.py @@ -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 = []