From 841c6036ef02d0d6a15c315d1886349096b3e6ac Mon Sep 17 00:00:00 2001 From: Vishakha Kathole Date: Thu, 30 May 2024 16:43:15 +0530 Subject: [PATCH] change POD_OBJ Signed-off-by: Vishakha Kathole --- ocs_ci/helpers/helpers.py | 4 ++-- .../kcs/test_selinux_relabel_solution.py | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ocs_ci/helpers/helpers.py b/ocs_ci/helpers/helpers.py index 06610ba6006..615a71f7786 100644 --- a/ocs_ci/helpers/helpers.py +++ b/ocs_ci/helpers/helpers.py @@ -2855,9 +2855,9 @@ def modify_deploymentconfig_replica_count( i.e to scale up or down deploymentconfig Args: - deploymentcofig_name (str): Name of deployment + deploymentcofig_name (str): Name of deploymentconfig replica_count (int): replica count to be changed to - namespace (str): namespace where the deployment exists + namespace (str): namespace where the deploymentconfig exists Returns: bool: True in case if changes are applied. False otherwise diff --git a/tests/cross_functional/kcs/test_selinux_relabel_solution.py b/tests/cross_functional/kcs/test_selinux_relabel_solution.py index f2f84bf4654..bd1802a9a03 100644 --- a/tests/cross_functional/kcs/test_selinux_relabel_solution.py +++ b/tests/cross_functional/kcs/test_selinux_relabel_solution.py @@ -304,21 +304,19 @@ def test_selinux_relabel_for_existing_pvc( self.apply_selinux_solution_on_existing_pvc(self.pvc_obj) # Delete pod so that fix will be applied for new pod - POD_OBJ = ocp.OCP( - kind=constants.POD, namespace=config.ENV_DATA["cluster_namespace"] - ) assert modify_deploymentconfig_replica_count( deploymentconfig_name=self.pod_obj.get_labels().get("name"), replica_count=0 ), "Failed to scale down deploymentconfig to 0" - POD_OBJ.wait_for_delete(resource_name=self.pod_obj.name, timeout=600) + self.pod_obj.delete(wait=True) assert modify_deploymentconfig_replica_count( deploymentconfig_name=self.pod_obj.get_labels().get("name"), replica_count=1 ), "Failed to scale down deploymentconfig to 1" self.pod_obj = self.get_app_pod_obj() - - POD_OBJ.wait_for_resource( + ocp.OCP( + kind=constants.POD, namespace=constants.OPENSHIFT_STORAGE_NAMESPACE + ).wait_for_resource( condition=constants.STATUS_RUNNING, resource_name=self.pod_obj.name, resource_count=1,