From 19a779c3051565cdbfa080460e46a00e824b2589 Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Wed, 19 Dec 2018 20:02:14 +0530 Subject: Fix bug in 'test_volume_creation_no_free_devices' test case Which uses improper vars in block of code where we disable redundant nodes. It is just not executed in case we use 3-node Gluster cluster. So, fix var usages making this test be compatible with 4+ node GLuster clusters. Change-Id: Id9ac9ae9b614c492c0f39573c0224378f887fee5 --- tests/functional/common/heketi/test_volume_creation.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/functional/common/heketi/test_volume_creation.py b/tests/functional/common/heketi/test_volume_creation.py index b3db8446..07dba094 100644 --- a/tests/functional/common/heketi/test_volume_creation.py +++ b/tests/functional/common/heketi/test_volume_creation.py @@ -110,11 +110,10 @@ class TestVolumeCreationTestCases(heketi_libs.HeketiBaseClass): node_info_list.append(node_info) # Disable 4th and other nodes - if len(node_id_list) > 3: - for node in node_id_list[3:]: - heketi_ops.heketi_node_disable(node, server_url, node_id) - self.addCleanup( - heketi_ops.heketi_node_enable, node, server_url, node_id) + for node_id in node_id_list[3:]: + heketi_ops.heketi_node_disable(node, server_url, node_id) + self.addCleanup( + heketi_ops.heketi_node_enable, node, server_url, node_id) # Disable second and other devices on the first 3 nodes for node_info in node_info_list[0:3]: -- cgit