Commit f93f09e7 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 's3-directories-get' into 'master'

Use directories.new when getting S3 directory

Closes gitlab-com/gl-infra/infrastructure#5807

See merge request gitlab-org/gitlab-ce!23981
parents bb444211 2bfc3174
---
title: Allow 'rake gitlab:cleanup:remote_upload_files' to read bucket files without
having permissions to see all buckets.
merge_request: 23981
author:
type: fixed
......@@ -67,7 +67,7 @@ module Gitlab
end
def remote_directory
connection.directories.get(configuration['remote_directory'])
connection.directories.new(key: configuration['remote_directory'])
end
def connection
......
......@@ -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
......
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