diff --git a/pulp_file/pytest_plugin.py b/pulp_file/pytest_plugin.py index d1c42057f9..bd468d1ec6 100644 --- a/pulp_file/pytest_plugin.py +++ b/pulp_file/pytest_plugin.py @@ -380,4 +380,3 @@ def _generate_server_and_remote(*, manifest_path, policy): return server, remote yield _generate_server_and_remote - diff --git a/pulp_file/tests/functional/api/test_acs.py b/pulp_file/tests/functional/api/test_acs.py index ab7d7632db..b4150b3112 100644 --- a/pulp_file/tests/functional/api/test_acs.py +++ b/pulp_file/tests/functional/api/test_acs.py @@ -12,7 +12,6 @@ ) - @pytest.mark.parallel def test_acs_validation_and_update( file_bindings, diff --git a/pulpcore/tests/functional/api/using_plugin/test_content_delivery.py b/pulpcore/tests/functional/api/using_plugin/test_content_delivery.py index d790324c1e..862d0a6e0f 100644 --- a/pulpcore/tests/functional/api/using_plugin/test_content_delivery.py +++ b/pulpcore/tests/functional/api/using_plugin/test_content_delivery.py @@ -1,16 +1,11 @@ """Tests related to content delivery.""" import hashlib -import random -import select import subprocess import uuid -from contextlib import contextmanager -from multiprocessing import Process, Queue from urllib.parse import urljoin import pytest -import requests from aiohttp.client_exceptions import ClientPayloadError, ClientResponseError from pulpcore.client.pulp_file import RepositorySyncURL @@ -143,8 +138,7 @@ def test_remote_content_changed_with_on_demand( download_file(get_url) # Assert again with curl just to be sure. - result = subprocess.run(["curl", "-v", get_url], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + result = subprocess.run(["curl", "-v", get_url], stdout=subprocess.PIPE, stderr=subprocess.PIPE) assert result.returncode == 18 assert b"* Closing connection 0" in result.stderr assert b"curl: (18) transfer closed with outstanding read data remaining" in result.stderr @@ -160,7 +154,7 @@ def test_handling_remote_artifact_on_demand_streaming_failure( monitor_task_group, file_distribution_factory, gen_object_with_cleanup, - generate_server_and_remote + generate_server_and_remote, ): """ GIVEN A content synced with on-demand which has 2 RemoteArtifacts (Remote + ACS). @@ -175,12 +169,10 @@ def test_handling_remote_artifact_on_demand_streaming_failure( # Plumbing def create_simple_remote(manifest_path): - remote = file_remote_factory( - manifest_path=manifest_path, policy="on_demand") + remote = file_remote_factory(manifest_path=manifest_path, policy="on_demand") body = RepositorySyncURL(remote=remote.pulp_href) monitor_task( - file_bindings.RepositoriesFileApi.sync( - file_repo_with_auto_publish.pulp_href, body).task + file_bindings.RepositoriesFileApi.sync(file_repo_with_auto_publish.pulp_href, body).task ) return remote @@ -190,27 +182,22 @@ def create_acs_remote(manifest_path): ) acs = gen_object_with_cleanup( file_bindings.AcsFileApi, - {"remote": acs_remote.pulp_href, - "paths": [], "name": str(uuid.uuid4())}, + {"remote": acs_remote.pulp_href, "paths": [], "name": str(uuid.uuid4())}, ) - monitor_task_group(file_bindings.AcsFileApi.refresh( - acs.pulp_href).task_group) + monitor_task_group(file_bindings.AcsFileApi.refresh(acs.pulp_href).task_group) return acs def sync_publish_and_distribute(remote): body = RepositorySyncURL(remote=remote.pulp_href) monitor_task( - file_bindings.RepositoriesFileApi.sync( - file_repo_with_auto_publish.pulp_href, body).task + file_bindings.RepositoriesFileApi.sync(file_repo_with_auto_publish.pulp_href, body).task ) - repo = file_bindings.RepositoriesFileApi.read( - file_repo_with_auto_publish.pulp_href) + repo = file_bindings.RepositoriesFileApi.read(file_repo_with_auto_publish.pulp_href) distribution = file_distribution_factory(repository=repo.pulp_href) return distribution def refresh_acs(acs): - monitor_task_group(file_bindings.AcsFileApi.refresh( - acs.pulp_href).task_group) + monitor_task_group(file_bindings.AcsFileApi.refresh(acs.pulp_href).task_group) return acs def get_original_content_info(remote): @@ -225,8 +212,7 @@ def download_from_distribution(content, distribution): return actual_checksum # GIVEN - basic_manifest_path = write_3_iso_file_fixture_data_factory( - "basic", seed=123) + basic_manifest_path = write_3_iso_file_fixture_data_factory("basic", seed=123) acs_manifest_path = write_3_iso_file_fixture_data_factory("acs", seed=123) remote = create_simple_remote(basic_manifest_path) distribution = sync_publish_and_distribute(remote)