Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label the s3cli pod's Namespace with S3CLI_APP_LABEL to ignore potential false leftover error #11147

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2764,7 +2764,7 @@ def awscli_pod_fixture(request, scope_name):

"""
project = f"s3cli-{get_random_str()}"
ocp_obj = ocp.OCP(namespace=project)
ocp_obj = ocp.OCP(kind="namespace", namespace=project)

def delete_project(namespace):
if "openshift" not in namespace:
Expand All @@ -2774,6 +2774,10 @@ def delete_project(namespace):
request.addfinalizer(lambda: awscli_pod_cleanup(namespace=project))

ocp_obj.new_project(project)

# Ignore potential letover on teardown
ocp_obj.add_label(resource_name=project, label=constants.S3CLI_APP_LABEL)

ocp.switch_to_default_rook_cluster_project()
return create_awscli_pod(scope_name, project)

Expand Down
Loading