summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvamahaja <vamahaja@redhat.com>2019-07-16 12:04:19 +0530
committervamahaja <vamahaja@redhat.com>2019-08-07 12:34:13 +0530
commitaed2e7e9543969c604a61af020c8a5fbaf38cd04 (patch)
tree0c4de45068e49869b5d0c0cc56ac804dd35bcdc5 /tests
parent9443109a6fd20e8124b37099e620e6551b25dc8a (diff)
Workaround BZ-1727360 in the "get_gluster_pod_names_by_pvc_name" func
"get_gluster_pod_names_by_pvc_name" function depends on the ocp3.11 specific shell command, which fails on old OCP versions. So, fix it by getting info in compatible way. Also, update usages of this function with new return data structure. Change-Id: Ibb8559590a1288c032630b3292f631d28bc87263 Signed-off-by: vamahaja <vamahaja@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/provisioning/test_dynamic_provisioning_block.py2
-rw-r--r--tests/functional/provisioning/test_dynamic_provisioning_file.py2
-rw-r--r--tests/functional/test_node_restart.py6
3 files changed, 6 insertions, 4 deletions
diff --git a/tests/functional/provisioning/test_dynamic_provisioning_block.py b/tests/functional/provisioning/test_dynamic_provisioning_block.py
index ae7198db..0a587973 100644
--- a/tests/functional/provisioning/test_dynamic_provisioning_block.py
+++ b/tests/functional/provisioning/test_dynamic_provisioning_block.py
@@ -176,7 +176,7 @@ class TestDynamicProvisioningBlockP0(GlusterBlockBaseClass):
oc_delete(self.node, 'pod', gluster_pod_data["pod_name"])
cmd = ("oc get pods -o wide | grep glusterfs | grep %s | "
"grep -v Terminating | awk '{print $1}'") % (
- gluster_pod_data["host_name"])
+ gluster_pod_data["pod_hostname"])
for w in Waiter(600, 15):
out = self.cmd_run(cmd)
new_gluster_pod_name = out.strip().split("\n")[0].strip()
diff --git a/tests/functional/provisioning/test_dynamic_provisioning_file.py b/tests/functional/provisioning/test_dynamic_provisioning_file.py
index 64e94aba..4b53d3c6 100644
--- a/tests/functional/provisioning/test_dynamic_provisioning_file.py
+++ b/tests/functional/provisioning/test_dynamic_provisioning_file.py
@@ -242,7 +242,7 @@ class TestDynamicProvisioningP0(BaseClass):
oc_delete(self.node, 'pod', gluster_pod_data["pod_name"])
cmd = ("oc get pods -o wide | grep glusterfs | grep %s | "
"grep -v Terminating | awk '{print $1}'") % (
- gluster_pod_data["host_name"])
+ gluster_pod_data["pod_hostname"])
for w in Waiter(600, 15):
out = self.cmd_run(cmd)
new_gluster_pod_name = out.strip().split("\n")[0].strip()
diff --git a/tests/functional/test_node_restart.py b/tests/functional/test_node_restart.py
index 745ea2db..2452c616 100644
--- a/tests/functional/test_node_restart.py
+++ b/tests/functional/test_node_restart.py
@@ -7,7 +7,7 @@ from openshiftstoragelibs.baseclass import BaseClass
from openshiftstoragelibs.exceptions import ExecutionError
from openshiftstoragelibs.openshift_ops import (
check_service_status_on_pod,
- get_ocp_gluster_pod_names,
+ get_ocp_gluster_pod_details,
oc_rsh,
wait_for_pod_be_ready,
)
@@ -20,7 +20,9 @@ class TestNodeRestart(BaseClass):
super(TestNodeRestart, self).setUp()
self.oc_node = self.ocp_master_node[0]
- self.gluster_pod_list = get_ocp_gluster_pod_names(self.oc_node)
+ self.gluster_pod_list = [
+ pod["pod_name"]
+ for pod in get_ocp_gluster_pod_details(self.oc_node)]
if not self.gluster_pod_list:
self.skipTest("Standalone Gluster is not supported by this test.")
self.gluster_pod_name = self.gluster_pod_list[0]