Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-14 09:11:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-14 09:11:16 +0300
commit298ae510cefeae8a8ffb9a868fefd9eceeac4122 (patch)
tree874a874b5d4117b97c9fd8475d76b9aa7dc966ce /spec/initializers
parent04698e448a10aedea2f3ed37ffd0327e9b91426e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/initializers')
-rw-r--r--spec/initializers/carrierwave_patch_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/initializers/carrierwave_patch_spec.rb b/spec/initializers/carrierwave_patch_spec.rb
index efe13f0eece..cbdad4aa9ac 100644
--- a/spec/initializers/carrierwave_patch_spec.rb
+++ b/spec/initializers/carrierwave_patch_spec.rb
@@ -39,6 +39,14 @@ RSpec.describe 'CarrierWave::Storage::Fog::File' do
let(:dest_filename) { 'copied.txt'}
it 'copies the file' do
+ fog_file = subject.send(:file)
+
+ expect(fog_file).to receive(:concurrency=).with(10).and_call_original
+ # multipart_chunk_size must be explicitly set in order to leverage
+ # multithreaded, multipart transfers for files below 5GB.
+ expect(fog_file).to receive(:multipart_chunk_size=).with(10.megabytes).and_call_original
+ expect(fog_file).to receive(:copy).with(bucket_name, dest_filename, anything).and_call_original
+
result = subject.copy_to(dest_filename)
expect(result.exists?).to be true