From 9258e19fd91be0feedf18fa259334aa6323d5196 Mon Sep 17 00:00:00 2001 From: Arun Kumar Date: Mon, 11 May 2020 13:02:20 +0530 Subject: [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 --- tests/functional/heketi/test_heketi_zones.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests') 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) -- cgit