summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-02-26 20:47:08 +0530
committerValerii Ponomarov <vponomar@redhat.com>2019-02-26 20:47:08 +0530
commitfaa8352fa7c4354b04c350ff601ff9b052c50d35 (patch)
treeb6b71f8072fa0c3a0a6664cc2bf8468ba514f24f /tests
parenta53105e63e02e9594587f188aca75b6121ec8a23 (diff)
Use unique prefixes for test cases in 'test_gluster_services_restart.py'
Right now, we use single prefix for all the test cases of 'test_gluster_services_restart' python test module. It is fragile approach, because if first test fails to delete heketi or gluster volume, then all other test cases fail too, but should not do it. So, use unique prefixes for each of the test cases in this module, to make failure be unique per test. Change-Id: I1cc68ffc0553f79d0b0623335a2aaf985feabade
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/common/gluster_stability/test_gluster_services_restart.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/functional/common/gluster_stability/test_gluster_services_restart.py b/tests/functional/common/gluster_stability/test_gluster_services_restart.py
index 2170815e..bbde551f 100644
--- a/tests/functional/common/gluster_stability/test_gluster_services_restart.py
+++ b/tests/functional/common/gluster_stability/test_gluster_services_restart.py
@@ -35,6 +35,7 @@ from cnslibs.common.gluster_ops import (
restart_gluster_vol_brick_processes,
wait_to_heal_complete,
)
+from cnslibs.common import utils
HEKETI_BLOCK_VOLUME_REGEX = "^Id:(.*).Cluster:(.*).Name:%s_(.*)$"
@@ -53,11 +54,7 @@ class GlusterStabilityTestSetup(BaseClass):
in cleanup method
"""
self.oc_node = self.ocp_master_node[0]
-
- # prefix used to create resources, generating using glusto_test_id
- # which uses time and date of test case
- self.prefix = "autotest-%s" % (self.glustotest_run_id.replace("_", ""))
-
+ self.prefix = "autotest-%s" % utils.get_random_str()
_storage_class = self.storage_classes.get(
'storage_class2',
self.storage_classes.get('block_storage_class'))