Skip to content

Commit

Permalink
change POD_OBJ
Browse files Browse the repository at this point in the history
Signed-off-by: Vishakha Kathole <[email protected]>
  • Loading branch information
vkathole authored and openshift-cherrypick-robot committed May 31, 2024
1 parent 4b1fe11 commit 841c603
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ocs_ci/helpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions tests/cross_functional/kcs/test_selinux_relabel_solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 841c603

Please sign in to comment.