diff options
Diffstat (limited to 'spec/lib/backup/gitaly_backup_spec.rb')
-rw-r--r-- | spec/lib/backup/gitaly_backup_spec.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/lib/backup/gitaly_backup_spec.rb b/spec/lib/backup/gitaly_backup_spec.rb index a48a1752eff..7797bd12f0e 100644 --- a/spec/lib/backup/gitaly_backup_spec.rb +++ b/spec/lib/backup/gitaly_backup_spec.rb @@ -131,8 +131,19 @@ RSpec.describe Backup::GitalyBackup do context 'parallel option set' do let(:parallel) { 3 } - it 'does not pass parallel option through' do - expect(Open3).to receive(:popen2).with(ENV, anything, 'restore', '-path', anything).and_call_original + it 'passes parallel option through' do + expect(Open3).to receive(:popen2).with(ENV, anything, 'restore', '-path', anything, '-parallel', '3').and_call_original + + subject.start(:restore) + subject.wait + end + end + + context 'parallel_storage option set' do + let(:parallel_storage) { 3 } + + it 'passes parallel option through' do + expect(Open3).to receive(:popen2).with(ENV, anything, 'restore', '-path', anything, '-parallel-storage', '3').and_call_original subject.start(:restore) subject.wait |