From: Andrew Schoen Date: Sun, 4 Dec 2016 02:10:35 +0000 (-0600) Subject: tests: tests mon services to ensure they are running correctly X-Git-Tag: v2.1.0~26^2~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a31c86c191fcb2cb3b28fb2f4b6f0199fd24351e;p=ceph-ansible.git tests: tests mon services to ensure they are running correctly Signed-off-by: Andrew Schoen --- diff --git a/tests/functional/tests/mon/test_mons.py b/tests/functional/tests/mon/test_mons.py new file mode 100644 index 000000000..fa5b389cc --- /dev/null +++ b/tests/functional/tests/mon/test_mons.py @@ -0,0 +1,17 @@ + +class TestMons(object): + + def test_mon_listens_on_6789(self, CephNode, Socket): + assert Socket("tcp://%s:6789" % CephNode["address"]).is_listening + + def test_mon_service_is_running(self, CephNode, Service): + service_name = "ceph-mon@ceph-%s" % CephNode["vars"]["inventory_hostname"] + assert Service(service_name).is_running + + def test_mon_service_is_enabled(self, CephNode, Service): + service_name = "ceph-mon@ceph-%s" % CephNode["vars"]["inventory_hostname"] + assert Service(service_name).is_enabled + + def test_can_get_cluster_health(self, CephNode, Command): + output = Command.check_output("sudo ceph -s") + assert output.strip().startswith("cluster")