Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
56c40cea
Commit
56c40cea
authored
Mar 07, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `object_id` to `remote_id`
parent
1b3c74f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
ee/app/uploaders/object_storage.rb
ee/app/uploaders/object_storage.rb
+1
-1
ee/spec/uploaders/object_storage_spec.rb
ee/spec/uploaders/object_storage_spec.rb
+4
-4
spec/requests/lfs_http_spec.rb
spec/requests/lfs_http_spec.rb
+5
-5
No files found.
ee/app/uploaders/object_storage.rb
View file @
56c40cea
...
...
@@ -300,7 +300,7 @@ module ObjectStorage
def
store_workhorse_file!
(
params
,
identifier
)
filename
=
params
[
"
#{
identifier
}
.name"
]
if
remote_object_id
=
params
[
"
#{
identifier
}
.
object
_id"
]
if
remote_object_id
=
params
[
"
#{
identifier
}
.
remote
_id"
]
store_remote_file!
(
remote_object_id
,
filename
)
elsif
local_path
=
params
[
"
#{
identifier
}
.path"
]
store_local_file!
(
local_path
,
filename
)
...
...
ee/spec/uploaders/object_storage_spec.rb
View file @
56c40cea
...
...
@@ -583,7 +583,7 @@ describe ObjectStorage do
context
'when valid file is used'
do
context
'when no filename is specified'
do
let
(
:params
)
do
{
"file.
object
_id"
=>
"test/123123"
}
{
"file.
remote
_id"
=>
"test/123123"
}
end
it
'raises an error'
do
...
...
@@ -593,7 +593,7 @@ describe ObjectStorage do
context
'when invalid file is specified'
do
let
(
:params
)
do
{
"file.
object
_id"
=>
"../test/123123"
,
{
"file.
remote
_id"
=>
"../test/123123"
,
"file.name"
=>
"my_file.txt"
}
end
...
...
@@ -604,7 +604,7 @@ describe ObjectStorage do
context
'when non existing file is specified'
do
let
(
:params
)
do
{
"file.
object
_id"
=>
"test/12312300"
,
{
"file.
remote
_id"
=>
"test/12312300"
,
"file.name"
=>
"my_file.txt"
}
end
...
...
@@ -615,7 +615,7 @@ describe ObjectStorage do
context
'when filename is specified'
do
let
(
:params
)
do
{
"file.
object
_id"
=>
"test/123123"
,
{
"file.
remote
_id"
=>
"test/123123"
,
"file.name"
=>
"my_file.txt"
}
end
...
...
spec/requests/lfs_http_spec.rb
View file @
56c40cea
...
...
@@ -1081,10 +1081,10 @@ describe 'Git LFS API and storage' do
stub_lfs_object_storage
(
direct_upload:
true
)
end
[
'123123'
,
'../../123123'
].
each
do
|
object
_id
|
context
"with invalid
object_id:
#{
object
_id
}
"
do
[
'123123'
,
'../../123123'
].
each
do
|
remote
_id
|
context
"with invalid
remote_id:
#{
remote
_id
}
"
do
subject
do
put_finalize_with_args
(
'file.
object_id'
=>
object
_id
)
put_finalize_with_args
(
'file.
remote_id'
=>
remote
_id
)
end
it
'responds with status 403'
do
...
...
@@ -1095,7 +1095,7 @@ describe 'Git LFS API and storage' do
end
end
context
'with valid
object
_id'
do
context
'with valid
remote
_id'
do
before
do
fog_connection
.
directories
.
get
(
'lfs-objects'
).
files
.
create
(
key:
'tmp/upload/12312300'
,
...
...
@@ -1105,7 +1105,7 @@ describe 'Git LFS API and storage' do
subject
do
put_finalize_with_args
(
'file.
object
_id'
=>
'12312300'
,
'file.
remote
_id'
=>
'12312300'
,
'file.name'
=>
'name'
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment