Skip to content

Commit

Permalink
Fixing issue #9852 for test_selinux_relabel_for_existing_pvc (#9853)
Browse files Browse the repository at this point in the history
test_selinux_relabel_for_existing_pvc test failing because
in implementation of get_random_files contains the use of
 constants.OPENSHIFT_STORAGE_NAMESPACE which result in failuer
 of test case where custom namspace is used.

Signed-off-by: suchita-g <[email protected]>
  • Loading branch information
suchita-g authored May 27, 2024
1 parent 7982413 commit 126c801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/cross_functional/kcs/test_selinux_relabel_solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ def get_random_files(self, pod_obj):
# Get random files
data_path = f"{constants.FLEXY_MNT_CONTAINER_DIR}"
num_of_files = random.randint(3, 9)
ocp_obj = ocp.OCP(kind=constants.OPENSHIFT_STORAGE_NAMESPACE)
ocp_obj = ocp.OCP(kind=config.ENV_DATA["cluster_namespace"])
random_files = ocp_obj.exec_oc_cmd(
f"exec -n {constants.OPENSHIFT_STORAGE_NAMESPACE} -it {pod_obj.name} -- /bin/bash"
f'exec -n {config.ENV_DATA["cluster_namespace"]} -it {pod_obj.name} -- /bin/bash'
f' -c "find {data_path} -type f | "shuf" -n {num_of_files}"',
timeout=300,
)
Expand Down

0 comments on commit 126c801

Please sign in to comment.