diff --git a/pulp_file/tests/functional/api/test_domains.py b/pulp_file/tests/functional/api/test_domains.py index b687873d0e8..a90329a9c9a 100644 --- a/pulp_file/tests/functional/api/test_domains.py +++ b/pulp_file/tests/functional/api/test_domains.py @@ -128,7 +128,7 @@ def test_artifact_upload( assert dup_artifact.sha256 == second_artifact.sha256 # Delete the artifacts so domain can be deleted - body = {"orphan_protection_time": 0, "content_hrefs": second_artifact_href} + body = {"orphan_protection_time": 0, "content_hrefs": [second_artifact_href]} task = pulpcore_bindings.OrphansCleanupApi.cleanup(body, pulp_domain=domain.name).task monitor_task(task) diff --git a/pulpcore/pytest_plugin.py b/pulpcore/pytest_plugin.py index 080e30ef96e..4b2850fb14a 100644 --- a/pulpcore/pytest_plugin.py +++ b/pulpcore/pytest_plugin.py @@ -897,7 +897,7 @@ def _add_to_cleanup(api_client, pulp_href): # Also we can never be sure which one is the right ApiException to catch. if isinstance(api_client, ArtifactsApi): task_url = pulpcore_bindings.OrphansCleanupApi.cleanup( - {"orphan_protection_time": 0, "content_hrefs": pulp_href} + {"orphan_protection_time": 0, "content_hrefs": [pulp_href]} ).task else: task_url = api_client.delete(pulp_href).task diff --git a/pulpcore/tests/functional/api/test_crd_artifacts.py b/pulpcore/tests/functional/api/test_crd_artifacts.py index c0d6213bed6..2d9c0f4340a 100644 --- a/pulpcore/tests/functional/api/test_crd_artifacts.py +++ b/pulpcore/tests/functional/api/test_crd_artifacts.py @@ -34,7 +34,7 @@ def _upload_valid_attrs(artifact_api, file, data): for key, val in artifact.to_dict().items(): assert getattr(read_artifact, key) == val # Delete the Artifact - body = {"orphan_protection_time": 0, "content_hrefs": read_artifact.pulp_href} + body = {"orphan_protection_time": 0, "content_hrefs": [read_artifact.pulp_href]} monitor_task(pulpcore_bindings.OrphansCleanupApi.cleanup(body).task) with pytest.raises(ApiException) as e: artifact_api.read(read_artifact.pulp_href) @@ -171,7 +171,7 @@ def test_delete_artifact(pulpcore_bindings, pulpcore_random_file, gen_user, moni assert e.value.status == 403 # remove artifact through orphan cleanup - body = {"orphan_protection_time": 0, "content_hrefs": artifact.pulp_href} + body = {"orphan_protection_time": 0, "content_hrefs": [artifact.pulp_href]} monitor_task(pulpcore_bindings.OrphansCleanupApi.cleanup(body).task) file_exists = os.path.exists(path_to_file) assert not file_exists