summaryrefslogtreecommitdiffstats
path: root/tests/functional/heketi/test_heketi_zones.py
diff options
context:
space:
mode:
authorArun Kumar <aanand01762@gmail.com>2020-05-11 13:02:20 +0530
committerArun Kumar <aanand01762@gmail.com>2020-05-12 18:12:16 +0530
commit9258e19fd91be0feedf18fa259334aa6323d5196 (patch)
tree8b6a5bd236cdee7c59397839e833780ea666cf89 /tests/functional/heketi/test_heketi_zones.py
parent7a6bf7fc53c563644afb399e98f8b2b7e46d3a60 (diff)
[Test] Add TC's for PVC placement based on heketi zones
TC consists of - 1. Replica volume with minimum 4 nodes 2. Arbiter volume with minimum 4 nodes Change-Id: I325d8a7ebe8c0ff2f248712d517b43b484d70328 Signed-off-by: Arun Kumar <aanand01762@gmail.com>
Diffstat (limited to 'tests/functional/heketi/test_heketi_zones.py')
-rw-r--r--tests/functional/heketi/test_heketi_zones.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/functional/heketi/test_heketi_zones.py b/tests/functional/heketi/test_heketi_zones.py
index 7f4112b2..b5a2bc7c 100644
--- a/tests/functional/heketi/test_heketi_zones.py
+++ b/tests/functional/heketi/test_heketi_zones.py
@@ -208,13 +208,25 @@ class TestHeketiZones(baseclass.BaseClass):
(2, "none", True, True),
(3, "none", False, True),
(3, "none", True, True),
+ # Cases with minimum 4 nodes
+ (3, "strict", False, False, 4),
+ (3, "strict", True, False, 4),
+
)
@ddt.unpack
def test_check_pvc_placement_based_on_the_heketi_zones(
self, zone_count, heketi_zone_checking, is_arbiter_vol,
- expand=False):
+ expand=False, node_count=None):
# TODO(vponomar): implement setting env vars for the Heketi dc.
+ # Check amount of available online nodes
+ if node_count:
+ online_node_count = len(self._get_online_nodes())
+ if online_node_count < node_count:
+ self.skipTest(
+ 'Available node count {} is less than expected node '
+ 'count {}'.format(online_node_count, node_count))
+
# Check amount of available online heketi zones
self._check_for_available_zones(zone_count)