summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSri Vignesh <sselvan@redhat.com>2020-06-01 10:50:48 +0530
committerSri Vignesh <sselvan@redhat.com>2020-06-24 10:07:06 +0000
commit7c0cd8bdc98c25b019a1b5f0a7525a3c18d5a0db (patch)
tree3bcb88d8f75a8c41c77f4157bc35200b93474d09
parent996839721505b21c63cde9c42ef2253ef712049c (diff)
[TestFix] Fix gluster function parameter
In TC 'test_heketi_volume_create_with_cluster_node_down' incorrect gluster node is passed to gluster op function, which is executing required command on unexpected gluster node. Fix gluster function call with correct gluster node. Change-Id: I545d10e5dbf828e6b99f57ca825a01c224db13e3 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
-rw-r--r--tests/functional/heketi/test_heketi_create_volume.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/functional/heketi/test_heketi_create_volume.py b/tests/functional/heketi/test_heketi_create_volume.py
index 2ab95b5..1ac3638 100644
--- a/tests/functional/heketi/test_heketi_create_volume.py
+++ b/tests/functional/heketi/test_heketi_create_volume.py
@@ -36,7 +36,10 @@ from openshiftstoragelibs.heketi_ops import (
heketi_volume_info,
heketi_volume_list,
)
-from openshiftstoragelibs.openshift_ops import cmd_run_on_gluster_pod_or_node
+from openshiftstoragelibs.openshift_ops import (
+ cmd_run_on_gluster_pod_or_node,
+ wait_for_service_status_on_gluster_pod_or_node,
+)
from openshiftstoragelibs import exceptions
from openshiftstoragelibs import podcmd
from openshiftstoragelibs import waiter
@@ -376,11 +379,15 @@ class TestHeketiVolume(BaseClass):
finally:
for gluster_server in self.gluster_servers[:2]:
self.addCleanup(
+ wait_for_service_status_on_gluster_pod_or_node,
+ self.ocp_master_node[0], 'glusterd', 'active', 'running',
+ gluster_server)
+ self.addCleanup(
cmd_run_on_gluster_pod_or_node, self.ocp_master_node[0],
cmd_glusterd_start, gluster_node=gluster_server)
# Verify volume creation at the gluster side
- g_vol_list = get_volume_list('auto_get_gluster_endpoint')
+ g_vol_list = get_volume_list(self.gluster_servers[2])
self.assertTrue(g_vol_list, "Failed to get gluster volume list")
msg = "volume: %s not found in the volume list: %s" % (