summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Kumar <aanand01762@gmail.com>2020-06-16 13:14:59 +0530
committeraanand01762 <aanand01762@review.gluster.org>2020-06-26 05:50:53 +0000
commit78411ce2697b2e3b176bbe4d7fe35298ed308262 (patch)
tree7237917d798c9fb81042bba07dc9bc5e72a748f5
parent37916f7831a420fed8bd3836650150710c2cb1cd (diff)
[Test] Add TC creation of multiple heketi volumes with different sizes
Change-Id: I6d39e9c50dc46d4c9ba4c3cf68e8138ae1afc3c4 Signed-off-by: Arun Kumar <aanand01762@gmail.com>
-rw-r--r--tests/functional/heketi/test_heketi_volume_operations.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/functional/heketi/test_heketi_volume_operations.py b/tests/functional/heketi/test_heketi_volume_operations.py
index 35a68fae..2d5e3f0c 100644
--- a/tests/functional/heketi/test_heketi_volume_operations.py
+++ b/tests/functional/heketi/test_heketi_volume_operations.py
@@ -8,6 +8,7 @@ import pytest
from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.command import cmd_run
from openshiftstoragelibs.heketi_ops import (
+ get_total_free_space,
heketi_node_info,
heketi_volume_create,
heketi_volume_delete,
@@ -239,3 +240,20 @@ class TestHeketiVolumeOperations(BaseClass):
snap_list_before, snap_list_after,
"Expecting Snapshot count before {} and after creation {} to be "
"same".format(snap_list_before, snap_list_after))
+
+ @pytest.mark.tier1
+ def test_heketi_volume_create_mutiple_sizes(self):
+ """Validate creation of heketi volume with differnt sizes"""
+ sizes, required_space = [15, 50, 100], 495
+ h_node, h_url = self.heketi_client_node, self.heketi_server_url
+
+ # Skip test if space is not available
+ available_space = get_total_free_space(h_node, h_url)[0]
+ if required_space > available_space:
+ self.skipTest("Required space {} greater than the available space "
+ "{}".format(required_space, available_space))
+
+ # Create volume 3 times, each time different size
+ for size in sizes:
+ vol_id = heketi_volume_create(h_node, h_url, size, json=True)['id']
+ self.addCleanup(heketi_volume_delete, h_node, h_url, vol_id)