22
33import pytest
44
5- from pulpcore .client .pulp_file import RepositorySyncURL
5+ from pulpcore .client .pulp_file import FileRepositorySyncURL
66from pulpcore .tests .functional .utils import PulpTaskError
77
88GIT_REMOTE_URL = "https://github.com/pulp/pulp-smash.git"
@@ -65,7 +65,7 @@ def test_git_sync(file_bindings, file_repo, file_git_remote_factory, monitor_tas
6565 """Test syncing from a public Git repository."""
6666 remote = file_git_remote_factory (url = GIT_REMOTE_URL , git_ref = git_ref )
6767
68- body = RepositorySyncURL (remote = remote .pulp_href )
68+ body = FileRepositorySyncURL (remote = remote .pulp_href )
6969 monitor_task (file_bindings .RepositoriesFileApi .sync (file_repo .pulp_href , body ).task )
7070
7171 file_repo = file_bindings .RepositoriesFileApi .read (file_repo .pulp_href )
@@ -81,7 +81,7 @@ def test_git_sync_idempotent(file_bindings, file_repo, file_git_remote_factory,
8181 """Syncing the same Git ref twice should not create a new repository version."""
8282 remote = file_git_remote_factory (url = GIT_REMOTE_URL , git_ref = "main" )
8383
84- body = RepositorySyncURL (remote = remote .pulp_href )
84+ body = FileRepositorySyncURL (remote = remote .pulp_href )
8585 monitor_task (file_bindings .RepositoriesFileApi .sync (file_repo .pulp_href , body ).task )
8686
8787 file_repo = file_bindings .RepositoriesFileApi .read (file_repo .pulp_href )
@@ -104,7 +104,7 @@ def test_git_sync_invalid_url(file_bindings, file_repo, file_git_remote_factory,
104104 """Syncing with an invalid Git URL should raise a task error."""
105105 remote = file_git_remote_factory (url = "https://invalid.example.com/no-such-repo.git" )
106106
107- body = RepositorySyncURL (remote = remote .pulp_href )
107+ body = FileRepositorySyncURL (remote = remote .pulp_href )
108108 with pytest .raises (PulpTaskError ) as exc :
109109 monitor_task (file_bindings .RepositoriesFileApi .sync (file_repo .pulp_href , body ).task )
110110 assert "Failed to clone git repository" in exc .value .task .error ["description" ]
@@ -115,7 +115,7 @@ def test_git_sync_invalid_ref(file_bindings, file_repo, file_git_remote_factory,
115115 """Syncing with a non-existent git ref should raise a task error."""
116116 remote = file_git_remote_factory (url = GIT_REMOTE_URL , git_ref = "this-ref-does-not-exist-abc123" )
117117
118- body = RepositorySyncURL (remote = remote .pulp_href )
118+ body = FileRepositorySyncURL (remote = remote .pulp_href )
119119 with pytest .raises (PulpTaskError ) as exc :
120120 monitor_task (file_bindings .RepositoriesFileApi .sync (file_repo .pulp_href , body ).task )
121121 error_desc = exc .value .task .error ["description" ]
@@ -135,7 +135,7 @@ def test_git_sync_lfs(
135135 remote = file_git_remote_factory (url = LFS_REMOTE_URL )
136136 file_repo = file_repo_with_auto_publish
137137
138- body = RepositorySyncURL (remote = remote .pulp_href )
138+ body = FileRepositorySyncURL (remote = remote .pulp_href )
139139 monitor_task (file_bindings .RepositoriesFileApi .sync (file_repo .pulp_href , body ).task )
140140
141141 file_repo = file_bindings .RepositoriesFileApi .read (file_repo .pulp_href )
0 commit comments