Commit 1b3c74f9 authored by Alessio Caiazza's avatar Alessio Caiazza

RemoteStore -> RemoteObject

parent 6979dd0c
...@@ -153,7 +153,7 @@ module ObjectStorage ...@@ -153,7 +153,7 @@ module ObjectStorage
def workhorse_authorize def workhorse_authorize
if options = workhorse_remote_upload_options if options = workhorse_remote_upload_options
{ RemoteStore: options } { RemoteObject: options }
else else
{ TempPath: workhorse_local_upload_path } { TempPath: workhorse_local_upload_path }
end end
......
...@@ -401,21 +401,21 @@ describe ObjectStorage do ...@@ -401,21 +401,21 @@ describe ObjectStorage do
end end
it "does not return remote store" do it "does not return remote store" do
is_expected.not_to have_key('RemoteStore') is_expected.not_to have_key('RemoteObject')
end end
end end
shared_examples 'uses remote storage' do shared_examples 'uses remote storage' do
it "returns remote store" do it "returns remote store" do
is_expected.to have_key(:RemoteStore) is_expected.to have_key(:RemoteObject)
expect(subject[:RemoteStore]).to have_key(:ID) expect(subject[:RemoteObject]).to have_key(:ID)
expect(subject[:RemoteStore]).to have_key(:GetURL) expect(subject[:RemoteObject]).to have_key(:GetURL)
expect(subject[:RemoteStore]).to have_key(:DeleteURL) expect(subject[:RemoteObject]).to have_key(:DeleteURL)
expect(subject[:RemoteStore]).to have_key(:StoreURL) expect(subject[:RemoteObject]).to have_key(:StoreURL)
expect(subject[:RemoteStore][:GetURL]).to include(described_class::TMP_UPLOAD_PATH) expect(subject[:RemoteObject][:GetURL]).to include(described_class::TMP_UPLOAD_PATH)
expect(subject[:RemoteStore][:DeleteURL]).to include(described_class::TMP_UPLOAD_PATH) expect(subject[:RemoteObject][:DeleteURL]).to include(described_class::TMP_UPLOAD_PATH)
expect(subject[:RemoteStore][:StoreURL]).to include(described_class::TMP_UPLOAD_PATH) expect(subject[:RemoteObject][:StoreURL]).to include(described_class::TMP_UPLOAD_PATH)
end end
it "does not return local store" do it "does not return local store" do
...@@ -455,9 +455,9 @@ describe ObjectStorage do ...@@ -455,9 +455,9 @@ describe ObjectStorage do
let(:storage_url) { "https://uploads.s3-eu-central-1.amazonaws.com/" } let(:storage_url) { "https://uploads.s3-eu-central-1.amazonaws.com/" }
it 'returns links for S3' do it 'returns links for S3' do
expect(subject[:RemoteStore][:GetURL]).to start_with(storage_url) expect(subject[:RemoteObject][:GetURL]).to start_with(storage_url)
expect(subject[:RemoteStore][:DeleteURL]).to start_with(storage_url) expect(subject[:RemoteObject][:DeleteURL]).to start_with(storage_url)
expect(subject[:RemoteStore][:StoreURL]).to start_with(storage_url) expect(subject[:RemoteObject][:StoreURL]).to start_with(storage_url)
end end
end end
end end
...@@ -475,9 +475,9 @@ describe ObjectStorage do ...@@ -475,9 +475,9 @@ describe ObjectStorage do
let(:storage_url) { "https://storage.googleapis.com/uploads/" } let(:storage_url) { "https://storage.googleapis.com/uploads/" }
it 'returns links for Google Cloud' do it 'returns links for Google Cloud' do
expect(subject[:RemoteStore][:GetURL]).to start_with(storage_url) expect(subject[:RemoteObject][:GetURL]).to start_with(storage_url)
expect(subject[:RemoteStore][:DeleteURL]).to start_with(storage_url) expect(subject[:RemoteObject][:DeleteURL]).to start_with(storage_url)
expect(subject[:RemoteStore][:StoreURL]).to start_with(storage_url) expect(subject[:RemoteObject][:StoreURL]).to start_with(storage_url)
end end
end end
end end
......
...@@ -1008,7 +1008,7 @@ describe 'Git LFS API and storage' do ...@@ -1008,7 +1008,7 @@ describe 'Git LFS API and storage' do
it_behaves_like 'a valid response' do it_behaves_like 'a valid response' do
it 'responds with status 200, location of lfs store and object details' do it 'responds with status 200, location of lfs store and object details' do
expect(json_response['TempPath']).to eq(LfsObjectUploader.workhorse_local_upload_path) expect(json_response['TempPath']).to eq(LfsObjectUploader.workhorse_local_upload_path)
expect(json_response['RemoteStore']).to be_nil expect(json_response['RemoteObject']).to be_nil
expect(json_response['LfsOid']).to eq(sample_oid) expect(json_response['LfsOid']).to eq(sample_oid)
expect(json_response['LfsSize']).to eq(sample_size) expect(json_response['LfsSize']).to eq(sample_size)
end end
...@@ -1028,10 +1028,10 @@ describe 'Git LFS API and storage' do ...@@ -1028,10 +1028,10 @@ describe 'Git LFS API and storage' do
it_behaves_like 'a valid response' do it_behaves_like 'a valid response' do
it 'responds with status 200, location of lfs remote store and object details' do it 'responds with status 200, location of lfs remote store and object details' do
expect(json_response['TempPath']).to be_nil expect(json_response['TempPath']).to be_nil
expect(json_response['RemoteStore']).to have_key('ID') expect(json_response['RemoteObject']).to have_key('ID')
expect(json_response['RemoteStore']).to have_key('GetURL') expect(json_response['RemoteObject']).to have_key('GetURL')
expect(json_response['RemoteStore']).to have_key('StoreURL') expect(json_response['RemoteObject']).to have_key('StoreURL')
expect(json_response['RemoteStore']).to have_key('DeleteURL') expect(json_response['RemoteObject']).to have_key('DeleteURL')
expect(json_response['LfsOid']).to eq(sample_oid) expect(json_response['LfsOid']).to eq(sample_oid)
expect(json_response['LfsSize']).to eq(sample_size) expect(json_response['LfsSize']).to eq(sample_size)
end 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