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 ...@@ -67,7 +67,7 @@ module Gitlab
end end
def remote_directory def remote_directory
connection.directories.get(configuration['remote_directory']) connection.directories.new(key: configuration['remote_directory'])
end end
def connection def connection
......
...@@ -25,7 +25,7 @@ describe Gitlab::Cleanup::RemoteUploads do ...@@ -25,7 +25,7 @@ describe Gitlab::Cleanup::RemoteUploads do
expect(::Fog::Storage).to receive(:new).and_return(connection) 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) expect(directory).to receive(:files).and_return(remote_files)
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