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
1b3c74f9
Commit
1b3c74f9
authored
Mar 07, 2018
by
Alessio Caiazza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RemoteStore -> RemoteObject
parent
6979dd0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
+21
-21
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
+15
-15
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 @
1b3c74f9
...
@@ -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
{
Remote
Store
:
options
}
{
Remote
Object
:
options
}
else
else
{
TempPath
:
workhorse_local_upload_path
}
{
TempPath
:
workhorse_local_upload_path
}
end
end
...
...
ee/spec/uploaders/object_storage_spec.rb
View file @
1b3c74f9
...
@@ -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
(
'Remote
Store
'
)
is_expected
.
not_to
have_key
(
'Remote
Object
'
)
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
(
:Remote
Store
)
is_expected
.
to
have_key
(
:Remote
Object
)
expect
(
subject
[
:Remote
Store
]).
to
have_key
(
:ID
)
expect
(
subject
[
:Remote
Object
]).
to
have_key
(
:ID
)
expect
(
subject
[
:Remote
Store
]).
to
have_key
(
:GetURL
)
expect
(
subject
[
:Remote
Object
]).
to
have_key
(
:GetURL
)
expect
(
subject
[
:Remote
Store
]).
to
have_key
(
:DeleteURL
)
expect
(
subject
[
:Remote
Object
]).
to
have_key
(
:DeleteURL
)
expect
(
subject
[
:Remote
Store
]).
to
have_key
(
:StoreURL
)
expect
(
subject
[
:Remote
Object
]).
to
have_key
(
:StoreURL
)
expect
(
subject
[
:Remote
Store
][
:GetURL
]).
to
include
(
described_class
::
TMP_UPLOAD_PATH
)
expect
(
subject
[
:Remote
Object
][
:GetURL
]).
to
include
(
described_class
::
TMP_UPLOAD_PATH
)
expect
(
subject
[
:Remote
Store
][
:DeleteURL
]).
to
include
(
described_class
::
TMP_UPLOAD_PATH
)
expect
(
subject
[
:Remote
Object
][
:DeleteURL
]).
to
include
(
described_class
::
TMP_UPLOAD_PATH
)
expect
(
subject
[
:Remote
Store
][
:StoreURL
]).
to
include
(
described_class
::
TMP_UPLOAD_PATH
)
expect
(
subject
[
:Remote
Object
][
: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
[
:Remote
Store
][
:GetURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Object
][
:GetURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Store
][
:DeleteURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Object
][
:DeleteURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Store
][
:StoreURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Object
][
: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
[
:Remote
Store
][
:GetURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Object
][
:GetURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Store
][
:DeleteURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Object
][
:DeleteURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Store
][
:StoreURL
]).
to
start_with
(
storage_url
)
expect
(
subject
[
:Remote
Object
][
:StoreURL
]).
to
start_with
(
storage_url
)
end
end
end
end
end
end
...
...
spec/requests/lfs_http_spec.rb
View file @
1b3c74f9
...
@@ -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
[
'Remote
Store
'
]).
to
be_nil
expect
(
json_response
[
'Remote
Object
'
]).
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
[
'Remote
Store
'
]).
to
have_key
(
'ID'
)
expect
(
json_response
[
'Remote
Object
'
]).
to
have_key
(
'ID'
)
expect
(
json_response
[
'Remote
Store
'
]).
to
have_key
(
'GetURL'
)
expect
(
json_response
[
'Remote
Object
'
]).
to
have_key
(
'GetURL'
)
expect
(
json_response
[
'Remote
Store
'
]).
to
have_key
(
'StoreURL'
)
expect
(
json_response
[
'Remote
Object
'
]).
to
have_key
(
'StoreURL'
)
expect
(
json_response
[
'Remote
Store
'
]).
to
have_key
(
'DeleteURL'
)
expect
(
json_response
[
'Remote
Object
'
]).
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
...
...
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