summaryrefslogtreecommitdiffstats
path: root/tests/functional/heketi
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/heketi')
-rw-r--r--tests/functional/heketi/test_block_volumes_heketi.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/functional/heketi/test_block_volumes_heketi.py b/tests/functional/heketi/test_block_volumes_heketi.py
index a7905329..43c8a9ba 100644
--- a/tests/functional/heketi/test_block_volumes_heketi.py
+++ b/tests/functional/heketi/test_block_volumes_heketi.py
@@ -306,8 +306,12 @@ class TestBlockVolumeOps(GlusterBlockBaseClass):
heketi_volume_delete, self.heketi_client_node,
self.heketi_server_url, block_host_create_info["id"],
raise_on_error=False)
- block_vol_size = int(
- block_host_create_info["blockinfo"]["freesize"] / num_of_bv)
+
+ free_size = block_host_create_info["blockinfo"]["freesize"]
+ if free_size > num_of_bv:
+ block_vol_size = int(free_size / num_of_bv)
+ else:
+ block_vol_size, num_of_bv = 1, free_size
# Create specified number of BV's in BHV's created
for i in range(0, num_of_bv):