fix(test): fixed test and pull api endpoint. Fixes: RCCE-29
This commit is contained in:
parent
9174592ab3
commit
15bf624134
2 changed files with 5 additions and 1 deletions
|
|
@ -2273,6 +2273,7 @@ def pull(request, apiuser, repoid, remote_uri=Optional(None), sync_large_objects
|
||||||
repo = get_repo_or_error(repoid)
|
repo = get_repo_or_error(repoid)
|
||||||
remote_uri = Optional.extract(remote_uri)
|
remote_uri = Optional.extract(remote_uri)
|
||||||
remote_uri_display = remote_uri or repo.clone_uri_hidden
|
remote_uri_display = remote_uri or repo.clone_uri_hidden
|
||||||
|
sync_large_objects = Optional.extract(sync_large_objects)
|
||||||
if not has_superadmin_permission(apiuser):
|
if not has_superadmin_permission(apiuser):
|
||||||
_perms = ('repository.admin',)
|
_perms = ('repository.admin',)
|
||||||
validate_repo_permissions(apiuser, repoid, repo, _perms)
|
validate_repo_permissions(apiuser, repoid, repo, _perms)
|
||||||
|
|
|
||||||
|
|
@ -1040,8 +1040,11 @@ class TestLargeFileRepo(object):
|
||||||
|
|
||||||
oid = '7b331c02e313c7599d5a90212e17e6d3cb729bd2e1c9b873c302a63c95a2f9bf'
|
oid = '7b331c02e313c7599d5a90212e17e6d3cb729bd2e1c9b873c302a63c95a2f9bf'
|
||||||
oid_path = os.path.join(lfs_store, oid)
|
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(
|
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)
|
shutil.copy(oid_path, oid_destination)
|
||||||
|
|
||||||
node = tip.get_node('1MB.zip')
|
node = tip.get_node('1MB.zip')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue