diff options
author | Micaël Bergeron <mbergeron@gitlab.com> | 2018-06-22 09:32:57 -0400 |
---|---|---|
committer | Micaël Bergeron <mbergeron@gitlab.com> | 2018-06-22 09:32:57 -0400 |
commit | 63d15c83a14538d3cd4e27b89d26e63ccd595431 (patch) | |
tree | 847a5701a93580bc283cf19036bf8ca9f9a02626 | |
parent | 264d770bf37bec2ca04e8b93a062091e1bf5d4f4 (diff) | |
download | gitlab-ce-63d15c83a14538d3cd4e27b89d26e63ccd595431.tar.gz |
port stub_object_storage changesce-gitlab-elt
-rw-r--r-- | spec/support/helpers/stub_object_storage.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/support/helpers/stub_object_storage.rb b/spec/support/helpers/stub_object_storage.rb index bceaf8277ee..471b0a74a19 100644 --- a/spec/support/helpers/stub_object_storage.rb +++ b/spec/support/helpers/stub_object_storage.rb @@ -15,9 +15,14 @@ module StubObjectStorage return unless enabled + stub_object_storage(connection_params: uploader.object_store_credentials, + remote_directory: remote_directory) + end + + def stub_object_storage(connection_params:, remote_directory:) Fog.mock! - ::Fog::Storage.new(uploader.object_store_credentials).tap do |connection| + ::Fog::Storage.new(connection_params).tap do |connection| begin connection.directories.create(key: remote_directory) rescue Excon::Error::Conflict |