Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2018-12-21 14:16:15 +0300
committerJan Provaznik <jprovaznik@gitlab.com>2018-12-27 13:06:06 +0300
commit2bfc317492f0a5918c4861203f3eedf71b2627aa (patch)
tree852793689891b2d9e08922bfe6a8c9b6f874eb2f /spec/lib/gitlab/cleanup
parente242c8cd6b32f405c5734f9c3a61c48e746c30f1 (diff)
Use directories.new when getting S3 directory
Calling `Fog::Storage::AWS::Directories#get` requires the ListAllMyBuckets permission, but we can avoid that extra query and permission by initializing the directory with a specific bucket: https://stackoverflow.com/a/12288581/1992201
Diffstat (limited to 'spec/lib/gitlab/cleanup')
-rw-r--r--spec/lib/gitlab/cleanup/remote_uploads_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/cleanup/remote_uploads_spec.rb b/spec/lib/gitlab/cleanup/remote_uploads_spec.rb
index 8d03baeb07b..35642cd6e50 100644
--- a/spec/lib/gitlab/cleanup/remote_uploads_spec.rb
+++ b/spec/lib/gitlab/cleanup/remote_uploads_spec.rb
@@ -25,7 +25,7 @@ describe Gitlab::Cleanup::RemoteUploads do
expect(::Fog::Storage).to receive(:new).and_return(connection)
- expect(connection).to receive(:directories).and_return(double(get: directory))
+ expect(connection).to receive(:directories).and_return(double(new: directory))
expect(directory).to receive(:files).and_return(remote_files)
end