Commit 56c40cea authored by Kamil Trzciński's avatar Kamil Trzciński

Rename `object_id` to `remote_id`

parent 1b3c74f9
......@@ -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)
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment