diff --git a/CHANGES/3620.bugfix b/CHANGES/3620.bugfix new file mode 100644 index 000000000..ad89adebf --- /dev/null +++ b/CHANGES/3620.bugfix @@ -0,0 +1 @@ +Declared compatibility against pulpcore<3.70. diff --git a/pulp_rpm/tests/functional/api/test_character_encoding.py b/pulp_rpm/tests/functional/api/test_character_encoding.py index 2c27e1aab..0e36ff885 100644 --- a/pulp_rpm/tests/functional/api/test_character_encoding.py +++ b/pulp_rpm/tests/functional/api/test_character_encoding.py @@ -24,12 +24,12 @@ def test_upload_non_ascii( - tmp_path, artifacts_api_client, rpm_package_api, monitor_task, delete_orphans_pre + tmp_path, pulpcore_bindings, rpm_package_api, monitor_task, delete_orphans_pre ): """Test whether one can upload an RPM with non-ascii metadata.""" temp_file = tmp_path / str(uuid.uuid4()) temp_file.write_bytes(requests.get(RPM_WITH_NON_ASCII_URL).content) - artifact = artifacts_api_client.create(temp_file) + artifact = pulpcore_bindings.ArtifactsApi.create(temp_file) response = rpm_package_api.create( artifact=artifact.pulp_href, relative_path=RPM_WITH_NON_ASCII_NAME, @@ -39,12 +39,12 @@ def test_upload_non_ascii( def test_upload_non_utf8( - tmp_path, artifacts_api_client, rpm_package_api, monitor_task, delete_orphans_pre + tmp_path, pulpcore_bindings, rpm_package_api, monitor_task, delete_orphans_pre ): """Test whether an exception is raised when non-utf-8 is uploaded.""" temp_file = tmp_path / str(uuid.uuid4()) temp_file.write_bytes(requests.get(RPM_WITH_NON_UTF_8_URL).content) - artifact = artifacts_api_client.create(temp_file) + artifact = pulpcore_bindings.ArtifactsApi.create(temp_file) with pytest.raises(PulpTaskError) as ctx: response = rpm_package_api.create( artifact=artifact.pulp_href, diff --git a/pulp_rpm/tests/functional/api/test_consume_content.py b/pulp_rpm/tests/functional/api/test_consume_content.py index 68f43f84a..16939a430 100644 --- a/pulp_rpm/tests/functional/api/test_consume_content.py +++ b/pulp_rpm/tests/functional/api/test_consume_content.py @@ -112,11 +112,11 @@ def test_package_manager_consume( dnf_config_add_repo, dnf_install_rpm, create_distribution, - artifacts_api_client, + pulpcore_bindings, delete_orphans_pre, ): """Verify whether package manager can consume content from Pulp.""" - before_sync_artifact_count = artifacts_api_client.list().count + before_sync_artifact_count = pulpcore_bindings.ArtifactsApi.list().count autopublish = sync_policy != "mirror_complete" distribution = create_distribution( @@ -126,7 +126,7 @@ def test_package_manager_consume( sync_policy=sync_policy, ) - before_consumption_artifact_count = artifacts_api_client.list().count + before_consumption_artifact_count = pulpcore_bindings.ArtifactsApi.list().count # sync=mirror_complete creates new Artifacts for the metadata even w/ on_demand & streamed # sync!=mirror_complete sets autopublish=True so new Artifacts will also be created assert before_consumption_artifact_count > before_sync_artifact_count @@ -144,7 +144,7 @@ def test_package_manager_consume( ) assert rpm_name == rpm[0] - after_consumption_artifact_count = artifacts_api_client.list().count + after_consumption_artifact_count = pulpcore_bindings.ArtifactsApi.list().count if policy == "immediate" or policy == "streamed": assert before_consumption_artifact_count == after_consumption_artifact_count elif policy == "on_demand": diff --git a/pulp_rpm/tests/functional/api/test_distribution_tree.py b/pulp_rpm/tests/functional/api/test_distribution_tree.py index 823a4fe47..04c2273a5 100644 --- a/pulp_rpm/tests/functional/api/test_distribution_tree.py +++ b/pulp_rpm/tests/functional/api/test_distribution_tree.py @@ -142,11 +142,11 @@ def test_remove_repo_with_distribution_tree( init_and_sync, rpm_repository_api, rpm_content_distribution_trees_api, - orphans_cleanup_api_client, + pulpcore_bindings, monitor_task, ): """Sync repository with distribution tree and remove the repository.""" - response = orphans_cleanup_api_client.cleanup({"orphan_protection_time": 0}) + response = pulpcore_bindings.OrphansCleanupApi.cleanup({"orphan_protection_time": 0}) monitor_task(response.task) num_repos_start = rpm_repository_api.list().count @@ -158,6 +158,6 @@ def test_remove_repo_with_distribution_tree( assert rpm_repository_api.list().count == num_repos_start # Remove orphans and check if distribution tree was removed. - response = orphans_cleanup_api_client.cleanup({"orphan_protection_time": 0}) + response = pulpcore_bindings.OrphansCleanupApi.cleanup({"orphan_protection_time": 0}) monitor_task(response.task) assert rpm_content_distribution_trees_api.list().count == num_disttrees_start diff --git a/pulp_rpm/tests/functional/api/test_domains.py b/pulp_rpm/tests/functional/api/test_domains.py index 6eab7a9c1..2e465ac37 100644 --- a/pulp_rpm/tests/functional/api/test_domains.py +++ b/pulp_rpm/tests/functional/api/test_domains.py @@ -21,7 +21,7 @@ def test_domain_create( - domains_api_client, + pulpcore_bindings, gen_object_with_cleanup, monitor_task, rpm_package_api, @@ -34,7 +34,7 @@ def test_domain_create( "storage_class": "pulpcore.app.models.storage.FileSystem", "storage_settings": {"MEDIA_ROOT": "/var/lib/pulp/media/"}, } - domain = gen_object_with_cleanup(domains_api_client, body) + domain = gen_object_with_cleanup(pulpcore_bindings.DomainsApi, body) domain_name = domain.name # create and sync in default domain (not specified) @@ -53,7 +53,7 @@ def test_domain_create( def test_domain_sync( cleanup_domains, - domains_api_client, + pulpcore_bindings, gen_object_with_cleanup, monitor_task, rpm_advisory_api, @@ -72,7 +72,7 @@ def test_domain_sync( "storage_class": "pulpcore.app.models.storage.FileSystem", "storage_settings": {"MEDIA_ROOT": "/var/lib/pulp/media/"}, } - domain = gen_object_with_cleanup(domains_api_client, body) + domain = gen_object_with_cleanup(pulpcore_bindings.DomainsApi, body) domain_name = domain.name # create and sync in the newly-created domain @@ -130,7 +130,7 @@ def test_domain_sync( @pytest.mark.parallel def test_object_creation( - domains_api_client, gen_object_with_cleanup, rpm_repository_api, rpm_rpmremote_api + pulpcore_bindings, gen_object_with_cleanup, rpm_repository_api, rpm_rpmremote_api ): """Test basic object creation in a separate domain.""" body = { @@ -138,7 +138,7 @@ def test_object_creation( "storage_class": "pulpcore.app.models.storage.FileSystem", "storage_settings": {"MEDIA_ROOT": "/var/lib/pulp/media/"}, } - domain = gen_object_with_cleanup(domains_api_client, body) + domain = gen_object_with_cleanup(pulpcore_bindings.DomainsApi, body) domain_name = domain.name repo_body = {"name": str(uuid.uuid4())} @@ -175,10 +175,9 @@ def test_object_creation( @pytest.mark.parallel def test_artifact_from_file( - domains_api_client, + pulpcore_bindings, gen_object_with_cleanup, rpm_artifact_factory, - artifacts_api_client, ): """Test uploading artifacts in separate domains.""" body = { @@ -186,24 +185,24 @@ def test_artifact_from_file( "storage_class": "pulpcore.app.models.storage.FileSystem", "storage_settings": {"MEDIA_ROOT": "/var/lib/pulp/media/"}, } - domain1 = gen_object_with_cleanup(domains_api_client, body) + domain1 = gen_object_with_cleanup(pulpcore_bindings.DomainsApi, body) body = { "name": str(uuid.uuid4()), "storage_class": "pulpcore.app.models.storage.FileSystem", "storage_settings": {"MEDIA_ROOT": "/var/lib/pulp/media/"}, } - domain2 = gen_object_with_cleanup(domains_api_client, body) + domain2 = gen_object_with_cleanup(pulpcore_bindings.DomainsApi, body) # Create as-artifact in domain1 domain1_artifact = rpm_artifact_factory(pulp_domain=domain1.name) - artifacts = artifacts_api_client.list(pulp_domain=domain1.name) + artifacts = pulpcore_bindings.ArtifactsApi.list(pulp_domain=domain1.name) assert artifacts.count == 1 assert domain1_artifact.pulp_href == artifacts.results[0].pulp_href # Create as-artifact in domain2 domain2_artifact = rpm_artifact_factory(pulp_domain=domain2.name) - artifacts = artifacts_api_client.list(pulp_domain=domain2.name) + artifacts = pulpcore_bindings.ArtifactsApi.list(pulp_domain=domain2.name) assert artifacts.count == 1 assert domain2_artifact.pulp_href == artifacts.results[0].pulp_href @@ -225,7 +224,7 @@ def test_artifact_from_file( @pytest.mark.parallel def test_rpm_from_file( cleanup_domains, - domains_api_client, + pulpcore_bindings, rpm_package_factory, gen_object_with_cleanup, rpm_package_api, @@ -236,7 +235,7 @@ def test_rpm_from_file( "storage_class": "pulpcore.app.models.storage.FileSystem", "storage_settings": {"MEDIA_ROOT": "/var/lib/pulp/media/"}, } - domain = gen_object_with_cleanup(domains_api_client, body) + domain = gen_object_with_cleanup(pulpcore_bindings.DomainsApi, body) try: default_content = rpm_package_factory() @@ -253,7 +252,7 @@ def test_rpm_from_file( @pytest.mark.parallel def test_content_promotion( cleanup_domains, - domains_api_client, + pulpcore_bindings, download_content_unit, rpm_repository_api, rpm_rpmremote_factory, @@ -268,7 +267,7 @@ def test_content_promotion( "storage_class": "pulpcore.app.models.storage.FileSystem", "storage_settings": {"MEDIA_ROOT": "/var/lib/pulp/media/"}, } - domain = gen_object_with_cleanup(domains_api_client, body) + domain = gen_object_with_cleanup(pulpcore_bindings.DomainsApi, body) try: # Sync task @@ -314,7 +313,7 @@ def test_content_promotion( @pytest.mark.parallel def test_domain_rbac( - cleanup_domains, domains_api_client, gen_user, gen_object_with_cleanup, rpm_repository_api + cleanup_domains, pulpcore_bindings, gen_user, gen_object_with_cleanup, rpm_repository_api ): """Test domain level-roles.""" body = { @@ -322,7 +321,7 @@ def test_domain_rbac( "storage_class": "pulpcore.app.models.storage.FileSystem", "storage_settings": {"MEDIA_ROOT": "/var/lib/pulp/media/"}, } - domain = gen_object_with_cleanup(domains_api_client, body) + domain = gen_object_with_cleanup(pulpcore_bindings.DomainsApi, body) try: rpm_viewer = "rpm.rpmrepository_viewer" diff --git a/pulp_rpm/tests/functional/api/test_pulpimport.py b/pulp_rpm/tests/functional/api/test_pulpimport.py index c7ab03524..05cccb8f9 100644 --- a/pulp_rpm/tests/functional/api/test_pulpimport.py +++ b/pulp_rpm/tests/functional/api/test_pulpimport.py @@ -62,7 +62,7 @@ def _import_export_repositories( @pytest.fixture -def create_exporter(gen_object_with_cleanup, exporters_pulp_api_client, import_export_repositories): +def create_exporter(gen_object_with_cleanup, pulpcore_bindings, import_export_repositories): def _create_exporter(import_repos=None, export_repos=None, url=RPM_UNSIGNED_FIXTURE_URL): if not export_repos: _, export_repos = import_export_repositories(import_repos, export_repos, url=url) @@ -72,46 +72,44 @@ def _create_exporter(import_repos=None, export_repos=None, url=RPM_UNSIGNED_FIXT "repositories": [r.pulp_href for r in export_repos], "path": f"/tmp/{uuid.uuid4()}/", } - exporter = gen_object_with_cleanup(exporters_pulp_api_client, body) + exporter = gen_object_with_cleanup(pulpcore_bindings.ExportersPulpApi, body) return exporter return _create_exporter @pytest.fixture -def create_export(exporters_pulp_exports_api_client, create_exporter, monitor_task): +def create_export(pulpcore_bindings, create_exporter, monitor_task): def _create_export( import_repos=None, export_repos=None, url=RPM_UNSIGNED_FIXTURE_URL, exporter=None ): if not exporter: exporter = create_exporter(import_repos, export_repos, url=url) - export_response = exporters_pulp_exports_api_client.create(exporter.pulp_href, {}) + export_response = pulpcore_bindings.ExportersPulpExportsApi.create(exporter.pulp_href, {}) export_href = monitor_task(export_response.task).created_resources[0] - export = exporters_pulp_exports_api_client.read(export_href) + export = pulpcore_bindings.ExportersPulpExportsApi.read(export_href) return export return _create_export @pytest.fixture -def create_chunked_export(exporters_pulp_exports_api_client, create_exporter, monitor_task): +def create_chunked_export(pulpcore_bindings, create_exporter, monitor_task): def _create_chunked_export(import_repos, export_repos, url=RPM_UNSIGNED_FIXTURE_URL): exporter = create_exporter(import_repos, export_repos, url=url) - export_response = exporters_pulp_exports_api_client.create( + export_response = pulpcore_bindings.ExportersPulpExportsApi.create( exporter.pulp_href, {"chunk_size": "5KB"} ) export_href = monitor_task(export_response.task).created_resources[0] - export = exporters_pulp_exports_api_client.read(export_href) + export = pulpcore_bindings.ExportersPulpExportsApi.read(export_href) return export return _create_chunked_export @pytest.fixture -def pulp_importer_factory( - gen_object_with_cleanup, import_export_repositories, importers_pulp_api_client -): +def pulp_importer_factory(gen_object_with_cleanup, import_export_repositories, pulpcore_bindings): def _pulp_importer_factory( import_repos=None, exported_repos=None, @@ -141,7 +139,7 @@ def _pulp_importer_factory( "repo_mapping": mapping, } - importer = gen_object_with_cleanup(importers_pulp_api_client, body) + importer = gen_object_with_cleanup(pulpcore_bindings.ImportersPulpApi, body) return importer @@ -152,7 +150,7 @@ def _pulp_importer_factory( def perform_import( create_chunked_export, create_export, - importers_pulp_imports_api_client, + pulpcore_bindings, monitor_task_group, import_export_repositories, ): @@ -186,7 +184,7 @@ def _perform_import( if "path" not in body: body["path"] = filenames[0] - import_response = importers_pulp_imports_api_client.create(importer.pulp_href, body) + import_response = pulpcore_bindings.ImportersPulpImportsApi.create(importer.pulp_href, body) task_group = monitor_task_group(import_response.task_group) return task_group @@ -210,7 +208,7 @@ def test_import( def test_double_import( pulp_importer_factory, - importers_pulp_imports_api_client, + pulpcore_bindings, import_export_repositories, rpm_repository_api, perform_import, @@ -222,7 +220,7 @@ def test_double_import( perform_import(importer, import_repos, exported_repos) perform_import(importer, import_repos, exported_repos) - imports = importers_pulp_imports_api_client.list(importer.pulp_href).results + imports = pulpcore_bindings.ImportersPulpImportsApi.list(importer.pulp_href).results assert len(imports) == 2 for repo in import_repos: @@ -258,7 +256,7 @@ def test_clean_import( create_export, pulp_importer_factory, monitor_task, - orphans_cleanup_api_client, + pulpcore_bindings, perform_import, ): """Test an import into an empty instance.""" @@ -278,7 +276,7 @@ def test_clean_import( for repo in exported_repos: monitor_task(rpm_repository_api.delete(repo.pulp_href).task) - monitor_task(orphans_cleanup_api_client.cleanup({"orphan_protection_time": 0}).task) + monitor_task(pulpcore_bindings.OrphansCleanupApi.cleanup({"orphan_protection_time": 0}).task) existing_repos = rpm_repository_api.list().count # At this point we should be importing into a content-free-zone @@ -299,12 +297,8 @@ def test_create_missing_repos( rpm_repository_api, rpm_content_distribution_trees_api, monitor_task, - exporters_pulp_api_client, - exporters_pulp_exports_api_client, - orphans_cleanup_api_client, - importers_pulp_api_client, + pulpcore_bindings, gen_object_with_cleanup, - importers_pulp_imports_api_client, monitor_task_group, add_to_cleanup, ): @@ -342,13 +336,13 @@ def test_create_missing_repos( "repositories": [entity_map["rpm-repo"].pulp_href, entity_map["ks-repo"].pulp_href], "path": f"/tmp/{uuid.uuid4()}/", } - exporter = gen_object_with_cleanup(exporters_pulp_api_client, body) + exporter = gen_object_with_cleanup(pulpcore_bindings.ExportersPulpApi, body) entity_map["exporter-path"] = exporter.path # Step 3, export - export_response = exporters_pulp_exports_api_client.create(exporter.pulp_href, {}) + export_response = pulpcore_bindings.ExportersPulpExportsApi.create(exporter.pulp_href, {}) export_href = monitor_task(export_response.task).created_resources[0] - export = exporters_pulp_exports_api_client.read(export_href) + export = pulpcore_bindings.ExportersPulpExportsApi.read(export_href) filenames = [ f for f in list(export.output_file_info.keys()) @@ -363,12 +357,12 @@ def test_create_missing_repos( assert "//" not in an_export_filename # Step 4, exporter/repo-cleanup, orphans - exporters_pulp_api_client.delete(exporter.pulp_href) + pulpcore_bindings.ExportersPulpApi.delete(exporter.pulp_href) rpm_rpmremote_api.delete(entity_map["rpm-remote"].pulp_href) rpm_rpmremote_api.delete(entity_map["ks-remote"].pulp_href) rpm_repository_api.delete(entity_map["rpm-repo"].pulp_href) rpm_repository_api.delete(entity_map["ks-repo"].pulp_href) - monitor_task(orphans_cleanup_api_client.cleanup({"orphan_protection_time": 0}).task) + monitor_task(pulpcore_bindings.OrphansCleanupApi.cleanup({"orphan_protection_time": 0}).task) saved_entities = entity_map @@ -379,11 +373,11 @@ def test_create_missing_repos( body = { "name": str(uuid.uuid4()), } - importer = gen_object_with_cleanup(importers_pulp_api_client, body) + importer = gen_object_with_cleanup(pulpcore_bindings.ImportersPulpApi, body) # Step 6 # At this point we should be importing into a content-free-zone - import_response = importers_pulp_imports_api_client.create( + import_response = pulpcore_bindings.ImportersPulpImportsApi.create( importer.pulp_href, {"path": saved_entities["export-filename"], "create_repositories": True}, ) diff --git a/pulp_rpm/tests/functional/api/test_repo_sizes.py b/pulp_rpm/tests/functional/api/test_repo_sizes.py index fd4589399..347b48ea8 100644 --- a/pulp_rpm/tests/functional/api/test_repo_sizes.py +++ b/pulp_rpm/tests/functional/api/test_repo_sizes.py @@ -9,9 +9,9 @@ ) -def test_repo_size(init_and_sync, delete_orphans_pre, monitor_task, orphans_cleanup_api_client): +def test_repo_size(init_and_sync, delete_orphans_pre, monitor_task, pulpcore_bindings): """Test that RPM repos correctly report their on-disk artifact sizes.""" - monitor_task(orphans_cleanup_api_client.cleanup({"orphan_protection_time": 0}).task) + monitor_task(pulpcore_bindings.OrphansCleanupApi.cleanup({"orphan_protection_time": 0}).task) repo, _ = init_and_sync(url=RPM_UNSIGNED_FIXTURE_URL, policy="on_demand") cmd = ( @@ -39,11 +39,9 @@ def test_repo_size(init_and_sync, delete_orphans_pre, monitor_task, orphans_clea assert report["on-demand-size"] == 0 -def test_kickstart_repo_size( - init_and_sync, delete_orphans_pre, monitor_task, orphans_cleanup_api_client -): +def test_kickstart_repo_size(init_and_sync, delete_orphans_pre, monitor_task, pulpcore_bindings): """Test that kickstart RPM repos correctly report their on-disk artifact sizes.""" - monitor_task(orphans_cleanup_api_client.cleanup({"orphan_protection_time": 0}).task) + monitor_task(pulpcore_bindings.OrphansCleanupApi.cleanup({"orphan_protection_time": 0}).task) repo, _ = init_and_sync(url=RPM_KICKSTART_FIXTURE_URL, policy="on_demand") cmd = ( diff --git a/pulp_rpm/tests/functional/api/test_upload.py b/pulp_rpm/tests/functional/api/test_upload.py index be4c165ce..0dd86359a 100644 --- a/pulp_rpm/tests/functional/api/test_upload.py +++ b/pulp_rpm/tests/functional/api/test_upload.py @@ -32,7 +32,7 @@ def test_single_request_unit_and_duplicate_unit( - delete_orphans_pre, rpm_package_api, monitor_task, tasks_api_client + delete_orphans_pre, rpm_package_api, monitor_task, pulpcore_bindings ): """Test single request upload unit. @@ -61,7 +61,7 @@ def test_single_request_unit_and_duplicate_unit( monitor_task(upload.task) except PulpTaskError: pass - task_report = tasks_api_client.read(upload.task) + task_report = pulpcore_bindings.TasksApi.read(upload.task) assert task_report.created_resources[0] == package.pulp_href diff --git a/pulp_rpm/tests/functional/conftest.py b/pulp_rpm/tests/functional/conftest.py index 286098d00..60cec36b4 100644 --- a/pulp_rpm/tests/functional/conftest.py +++ b/pulp_rpm/tests/functional/conftest.py @@ -112,9 +112,11 @@ def rpm_copy_api(rpm_client): @pytest.fixture -def signed_artifact(artifacts_api_client, tmp_path): +def signed_artifact(pulpcore_bindings, tmp_path): data = requests.get(RPM_SIGNED_URL).content - artifacts = artifacts_api_client.list(sha256=hashlib.sha256(data).hexdigest(), limit=1) + artifacts = pulpcore_bindings.ArtifactsApi.list( + sha256=hashlib.sha256(data).hexdigest(), limit=1 + ) try: return artifacts.results[0].to_dict() except IndexError: @@ -122,13 +124,11 @@ def signed_artifact(artifacts_api_client, tmp_path): temp_file = tmp_path / str(uuid.uuid4()) temp_file.write_bytes(data) - return artifacts_api_client.create(temp_file).to_dict() + return pulpcore_bindings.ArtifactsApi.create(temp_file).to_dict() @pytest.fixture -def rpm_artifact_factory( - artifacts_api_client, gen_object_with_cleanup, pulp_domain_enabled, tmp_path -): +def rpm_artifact_factory(pulpcore_bindings, gen_object_with_cleanup, pulp_domain_enabled, tmp_path): """Return an artifact created from uploading an RPM file.""" def _rpm_artifact_factory(url=RPM_SIGNED_URL, pulp_domain=None): @@ -139,7 +139,7 @@ def _rpm_artifact_factory(url=RPM_SIGNED_URL, pulp_domain=None): if not pulp_domain_enabled: raise RuntimeError("Server does not have domains enabled.") kwargs["pulp_domain"] = pulp_domain - return gen_object_with_cleanup(artifacts_api_client, temp_file, **kwargs) + return gen_object_with_cleanup(pulpcore_bindings.ArtifactsApi, temp_file, **kwargs) return _rpm_artifact_factory @@ -194,13 +194,13 @@ def rpm_kickstart_repo_immediate(init_and_sync): @pytest.fixture(scope="session") -def rpm_metadata_signing_service(signing_service_api_client): - results = signing_service_api_client.list(name="sign-metadata") +def rpm_metadata_signing_service(pulpcore_bindings): + results = pulpcore_bindings.SigningServicesApi.list(name="sign-metadata") signing_service = None if results.count == 0: result = init_signed_repo_configuration() if result.returncode == 0: - results = signing_service_api_client.list(name="sign-metadata") + results = pulpcore_bindings.SigningServicesApi.list(name="sign-metadata") if results.count == 1: signing_service = results.results[0] @@ -286,7 +286,7 @@ def _from_results(advisory_id, vers_href): @pytest.fixture def setup_domain( - gen_object_with_cleanup, domains_api_client, rpm_rpmremote_api, rpm_repository_api, monitor_task + gen_object_with_cleanup, pulpcore_bindings, rpm_rpmremote_api, rpm_repository_api, monitor_task ): def _setup_domain(sync=True, url=RPM_SIGNED_FIXTURE_URL, pulp_domain=None): if not pulp_domain: @@ -295,7 +295,7 @@ def _setup_domain(sync=True, url=RPM_SIGNED_FIXTURE_URL, pulp_domain=None): "storage_class": "pulpcore.app.models.storage.FileSystem", "storage_settings": {"MEDIA_ROOT": "/var/lib/pulp/media/"}, } - pulp_domain = gen_object_with_cleanup(domains_api_client, body) + pulp_domain = gen_object_with_cleanup(pulpcore_bindings.DomainsApi, body) remote = gen_object_with_cleanup( rpm_rpmremote_api, {"name": str(uuid.uuid4()), "url": url}, pulp_domain=pulp_domain.name @@ -320,7 +320,7 @@ def _setup_domain(sync=True, url=RPM_SIGNED_FIXTURE_URL, pulp_domain=None): @pytest.fixture -def cleanup_domains(orphans_cleanup_api_client, monitor_task, rpm_repository_api): +def cleanup_domains(pulpcore_bindings, monitor_task, rpm_repository_api): def _cleanup_domains( domains, content_api_client=None, @@ -336,7 +336,7 @@ def _cleanup_domains( monitor_task(repository_api_client.delete(repo.pulp_href).task) # Let orphan-cleanup reap the resulting abandoned content monitor_task( - orphans_cleanup_api_client.cleanup( + pulpcore_bindings.OrphansCleanupApi.cleanup( {"orphan_protection_time": 0}, pulp_domain=domain.name ).task ) @@ -552,5 +552,7 @@ def _rpm_package_signing_service_name( @pytest.fixture -def rpm_package_signing_service(_rpm_package_signing_service_name, signing_service_api_client): - return signing_service_api_client.list(name=_rpm_package_signing_service_name).results[0] +def rpm_package_signing_service(_rpm_package_signing_service_name, pulpcore_bindings): + return pulpcore_bindings.SigningServicesApi.list( + name=_rpm_package_signing_service_name + ).results[0] diff --git a/requirements.txt b/requirements.txt index 6168db448..b43adeb71 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ django_readonly_field~=1.1.1 jsonschema>=4.6,<5.0 libcomps>=0.1.20.post1,<0.2 productmd~=1.33.0 -pulpcore>=3.44.1,<3.55 +pulpcore>=3.44.1,<3.70 solv~=0.7.21 aiohttp_xmlrpc~=1.5.0 importlib-resources~=6.4.0