Commit 63d15c83 authored by Micaël Bergeron's avatar Micaël Bergeron

port stub_object_storage changes

parent 264d770b
......@@ -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
......
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