Commit bf38936f authored by Stan Hu's avatar Stan Hu

Merge branch 'mk/avoid-extra-storage-perm-and-query' into 'master'

Avoid extra storage bucket perm and query

See merge request gitlab-org/gitlab-ce!23995
parents 33a9c35b d2d85c31
...@@ -195,7 +195,7 @@ module Backup ...@@ -195,7 +195,7 @@ module Backup
if connection.service == ::Fog::Storage::Local if connection.service == ::Fog::Storage::Local
connection.directories.create(key: remote_directory) connection.directories.create(key: remote_directory)
else else
connection.directories.get(remote_directory) connection.directories.new(key: remote_directory)
end end
end end
......
...@@ -1320,7 +1320,7 @@ describe API::Runner, :clean_gitlab_redis_shared_state do ...@@ -1320,7 +1320,7 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
end end
before do before do
fog_connection.directories.get('artifacts').files.create( fog_connection.directories.new(key: 'artifacts').files.create(
key: 'tmp/uploads/12312300', key: 'tmp/uploads/12312300',
body: 'content' body: 'content'
) )
......
...@@ -1123,7 +1123,7 @@ describe 'Git LFS API and storage' do ...@@ -1123,7 +1123,7 @@ describe 'Git LFS API and storage' do
context 'with valid remote_id' do context 'with valid remote_id' do
before do before do
fog_connection.directories.get('lfs-objects').files.create( fog_connection.directories.new(key: 'lfs-objects').files.create(
key: 'tmp/uploads/12312300', key: 'tmp/uploads/12312300',
body: 'content' body: 'content'
) )
......
...@@ -201,7 +201,7 @@ describe FileUploader do ...@@ -201,7 +201,7 @@ describe FileUploader do
end end
let!(:fog_file) do let!(:fog_file) do
fog_connection.directories.get('uploads').files.create( fog_connection.directories.new(key: 'uploads').files.create(
key: 'tmp/uploads/test/123123', key: 'tmp/uploads/test/123123',
body: 'content' body: 'content'
) )
......
...@@ -716,7 +716,7 @@ describe ObjectStorage do ...@@ -716,7 +716,7 @@ describe ObjectStorage do
end end
let!(:fog_file) do let!(:fog_file) do
fog_connection.directories.get('uploads').files.create( fog_connection.directories.new(key: 'uploads').files.create(
key: 'tmp/uploads/test/123123', key: 'tmp/uploads/test/123123',
body: 'content' body: 'content'
) )
......
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