From e7c2bd0fbdd874fc32d1e5fc344f26f5ffd5458c Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Tue, 7 Nov 2023 22:38:12 -0500 Subject: [PATCH] Add a test for issue #4681 [noissue] --- pulpcore/tests/functional/api/pulp_file/test_sync.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pulpcore/tests/functional/api/pulp_file/test_sync.py b/pulpcore/tests/functional/api/pulp_file/test_sync.py index 64d31bedbc..d578f0e059 100644 --- a/pulpcore/tests/functional/api/pulp_file/test_sync.py +++ b/pulpcore/tests/functional/api/pulp_file/test_sync.py @@ -1,4 +1,6 @@ """Tests that sync file plugin repositories.""" + +import os import uuid import pytest @@ -22,17 +24,20 @@ def test_sync_file_protocol_handler( ): """Test syncing from a file repository with the file:// protocol handler""" wget_recursive_download_on_host(urljoin(fixtures_cfg.remote_fixtures_origin, "file/"), "/tmp") - remote_kwargs = { "url": "file:///tmp/file/PULP_MANIFEST", "policy": "immediate", "name": str(uuid.uuid4()), } remote = gen_object_with_cleanup(file_remote_api_client, remote_kwargs) + files = set(os.listdir("/tmp/file/")) body = RepositorySyncURL(remote=remote.pulp_href) monitor_task(file_repository_api_client.sync(file_repo.pulp_href, body).task) + # test that all the files are still present + assert set(os.listdir("/tmp/file/")) == files + file_repo = file_repository_api_client.read(file_repo.pulp_href) assert file_repo.latest_version_href.endswith("/versions/1/")