]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: use new 'num_osds' variable in tests
authorAlfredo Deza <adeza@redhat.com>
Fri, 31 Aug 2018 19:32:08 +0000 (12:32 -0700)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Fri, 31 Aug 2018 21:23:20 +0000 (21:23 +0000)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
tests/functional/tests/osd/test_osds.py

index e87f6e1b017770e94c994b0118a57fd242b3030f..ed0e5a7bcf2f3d690e5d1f3b70fbe869bdd3efb8 100644 (file)
@@ -11,12 +11,12 @@ class TestOSDs(object):
 
     def test_osds_listen_on_public_network(self, node, host):
         # TODO: figure out way to paramaterize this test
-        nb_port = (node["num_devices"] * 2)
+        nb_port = (node["num_osds"] * 2)
         assert host.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, host):
         # TODO: figure out way to paramaterize this test
-        nb_port = (node["num_devices"] * 2)
+        nb_port = (node["num_osds"] * 2)
         assert host.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, host):
@@ -67,7 +67,7 @@ class TestOSDs(object):
     def test_all_osds_are_up_and_in(self, node, host):
         cmd = "sudo ceph --cluster={cluster} --connect-timeout 5 --keyring /var/lib/ceph/bootstrap-osd/{cluster}.keyring -n client.bootstrap-osd osd tree -f json".format(cluster=node["cluster_name"])
         output = json.loads(host.check_output(cmd))
-        assert node["num_devices"] == self._get_nb_up_osds_from_ids(node, output)
+        assert node["num_osds"] == self._get_nb_up_osds_from_ids(node, output)
 
     @pytest.mark.docker
     def test_all_docker_osds_are_up_and_in(self, node, host):
@@ -76,4 +76,4 @@ class TestOSDs(object):
             cluster=node["cluster_name"]
         )
         output = json.loads(host.check_output(cmd))
-        assert node["num_devices"] == self._get_nb_up_osds_from_ids(node, output)
\ No newline at end of file
+        assert node["num_osds"] == self._get_nb_up_osds_from_ids(node, output)