Merge pull request #1675 from ceph/fix_tests_osd_listening

tests: fix test_osds_listen_on_* tests
pull/1687/head
Andrew Schoen 2017-07-17 14:07:38 -05:00 committed by GitHub
commit a98b723a6a
1 changed files with 6 additions and 14 deletions

View File

@ -7,23 +7,15 @@ class TestOSDs(object):
def test_ceph_osd_package_is_installed(self, node, Package):
assert Package("ceph-osd").is_installed
def test_osds_listen_on_public_network(self, node, Socket):
def test_osds_listen_on_public_network(self, node, Command):
# TODO: figure out way to paramaterize this test
for x in range(0, node["num_devices"] * 2):
port = "680{}".format(x)
assert Socket("tcp://{address}:{port}".format(
address=node["address"],
port=port,
)).is_listening
nb_port = (node["num_devices"] * 2)
assert Command.check_output("netstat -lntp | grep ceph-osd | grep %s | wc -l" % (node["address"])) == str(nb_port)
def test_osds_listen_on_cluster_network(self, node, Socket):
def test_osds_listen_on_cluster_network(self, node, Command):
# TODO: figure out way to paramaterize this test
for x in range(0, node["num_devices"] * 2):
port = "680{}".format(x)
assert Socket("tcp://{address}:{port}".format(
address=node["cluster_address"],
port=port,
)).is_listening
nb_port = (node["num_devices"] * 2)
assert Command.check_output("netstat -lntp | grep ceph-osd | grep %s | wc -l" % (node["cluster_address"])) == str(nb_port)
def test_osd_services_are_running(self, node, Service):
# TODO: figure out way to paramaterize node['osds'] for this test