port stub_object_storage changes

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册