tests: tests mon services to ensure they are running correctly

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
pull/1150/head
Andrew Schoen 2016-12-03 20:10:35 -06:00
parent 7c1a45260d
commit a31c86c191
1 changed files with 17 additions and 0 deletions

View File

@ -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")