summaryrefslogtreecommitdiffstats
path: root/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py
diff options
context:
space:
mode:
authorkasturiNarra <knarra@redhat.com>2019-12-10 18:16:50 +0530
committervponomar <vponomar@redhat.com>2019-12-12 14:36:43 +0000
commitc1b6d23e29daf2da80722317ec2fd67b39523e3f (patch)
treec3a82e5e48f0c072b40e8b5af1e242b6122a2493 /tests/functional/heketi/test_create_distributed_replica_heketi_volume.py
parentd832892648b5609f1ff0a34bfd9836946b555d69 (diff)
Delete duplicate test "test_to_create_distribute_replicated_vol"
which completely duplicates "test_to_create_and_delete_dist_rep_vol" in 'test_create_distributed_replica_heketi_volume.py' test module & fix cleanup code for create_heketi_volume_with_name_and_wait in openshift-storage-libs/openshiftstoragelibs/baseclass.py module. Change-Id: I9b3dea28e6330e52caab09311e20b65dd48491b9
Diffstat (limited to 'tests/functional/heketi/test_create_distributed_replica_heketi_volume.py')
-rw-r--r--tests/functional/heketi/test_create_distributed_replica_heketi_volume.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py b/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py
index 82fcf70..7c15a23 100644
--- a/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py
+++ b/tests/functional/heketi/test_create_distributed_replica_heketi_volume.py
@@ -103,7 +103,8 @@ class TestHeketiVolume(BaseClass):
h_volume_name = "autotests-heketi-volume-%s" % utils.get_random_str()
try:
heketi_vol = self.create_heketi_volume_with_name_and_wait(
- h_volume_name, vol_size_gb, json=True)
+ h_volume_name, vol_size_gb, json=True,
+ raise_on_cleanup_error=False)
except AssertionError as e:
# NOTE: rare situation when we need to decrease size of a volume.
# and we expect this vol to be distributed.
@@ -116,7 +117,8 @@ class TestHeketiVolume(BaseClass):
vol_size_gb -= 1
heketi_vol = self.create_heketi_volume_with_name_and_wait(
- h_volume_name, vol_size_gb, json=True)
+ h_volume_name, vol_size_gb, json=True,
+ raise_on_cleanup_error=False)
g.log.info("Successfully created distributed volume.")
vol_name = heketi_vol['name']
@@ -192,14 +194,10 @@ class TestHeketiVolume(BaseClass):
free_space_after_creating_vol,
free_space_after_deleting_vol))
- def test_to_create_distribute_replicated_vol(self):
+ def test_to_create_and_delete_dist_rep_vol(self):
"""Validate 2x3 vol type creation when the volume cannot be
carved out of a single device
"""
- self._create_distributed_replica_vol(validate_cleanup=False)
-
- def test_to_create_and_delete_dist_rep_vol(self):
- """Validate whether deleting a dist-rep volume is handled by heketi"""
self._create_distributed_replica_vol(validate_cleanup=True)
@ddt.data(True, False)