From 15bf624134a8bbae84da541c79d8d64478d69a0f Mon Sep 17 00:00:00 2001 From: Serhii Ilin Date: Thu, 11 Jan 2024 18:05:51 +0200 Subject: [PATCH] fix(test): fixed test and pull api endpoint. Fixes: RCCE-29 --- rhodecode/api/views/repo_api.py | 1 + rhodecode/tests/vcs/test_git.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rhodecode/api/views/repo_api.py b/rhodecode/api/views/repo_api.py index 5e4f0b47..3c3f3c51 100644 --- a/rhodecode/api/views/repo_api.py +++ b/rhodecode/api/views/repo_api.py @@ -2273,6 +2273,7 @@ def pull(request, apiuser, repoid, remote_uri=Optional(None), sync_large_objects repo = get_repo_or_error(repoid) remote_uri = Optional.extract(remote_uri) remote_uri_display = remote_uri or repo.clone_uri_hidden + sync_large_objects = Optional.extract(sync_large_objects) if not has_superadmin_permission(apiuser): _perms = ('repository.admin',) validate_repo_permissions(apiuser, repoid, repo, _perms) diff --git a/rhodecode/tests/vcs/test_git.py b/rhodecode/tests/vcs/test_git.py index 13b52ae7..ab3d1417 100644 --- a/rhodecode/tests/vcs/test_git.py +++ b/rhodecode/tests/vcs/test_git.py @@ -1040,8 +1040,11 @@ class TestLargeFileRepo(object): oid = '7b331c02e313c7599d5a90212e17e6d3cb729bd2e1c9b873c302a63c95a2f9bf' oid_path = os.path.join(lfs_store, oid) + # Todo: oid path depends on LFSOidStorage.store_suffix. Once it will be changed update below line accordingly oid_destination = os.path.join( - conf.get('vcs_git_lfs', 'store_location'), oid) + conf.get('vcs_git_lfs', 'store_location'), f'objects/{oid[:2]}/{oid[2:4]}/{oid}') + + os.makedirs(os.path.dirname(oid_destination)) shutil.copy(oid_path, oid_destination) node = tip.get_node('1MB.zip')