diff options
author | Michael Kozono <mkozono@gmail.com> | 2018-12-21 09:56:37 -0800 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2018-12-21 10:34:05 -0800 |
commit | d2d85c31fea920b0e62fb600fc6de874762a71ad (patch) | |
tree | d63cbc08102fe75d28d8e302179e874e69f99409 /spec/uploaders | |
parent | a9049532a271117983430d2d80b8ad61879ecf7a (diff) | |
download | gitlab-ce-d2d85c31fea920b0e62fb600fc6de874762a71ad.tar.gz |
Avoid extra storage bucket perm and querymk/avoid-extra-storage-perm-and-query
Specifically, the `ListAllMyBuckets` permission.
This works if you know the directory exists.
See more:
* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23981
* https://stackoverflow.com/a/12288581/1992201
Diffstat (limited to 'spec/uploaders')
-rw-r--r-- | spec/uploaders/file_uploader_spec.rb | 2 | ||||
-rw-r--r-- | spec/uploaders/object_storage_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb index c74e0bf1955..db9e5eb2ad6 100644 --- a/spec/uploaders/file_uploader_spec.rb +++ b/spec/uploaders/file_uploader_spec.rb @@ -201,7 +201,7 @@ describe FileUploader do end let!(:fog_file) do - fog_connection.directories.get('uploads').files.create( + fog_connection.directories.new(key: 'uploads').files.create( key: 'tmp/uploads/test/123123', body: 'content' ) diff --git a/spec/uploaders/object_storage_spec.rb b/spec/uploaders/object_storage_spec.rb index 7e673681c31..533e9d87ea6 100644 --- a/spec/uploaders/object_storage_spec.rb +++ b/spec/uploaders/object_storage_spec.rb @@ -716,7 +716,7 @@ describe ObjectStorage do end let!(:fog_file) do - fog_connection.directories.get('uploads').files.create( + fog_connection.directories.new(key: 'uploads').files.create( key: 'tmp/uploads/test/123123', body: 'content' ) |