From 851dfe136bb3d443bcb9ece99de8faeea0535949 Mon Sep 17 00:00:00 2001 From: Adnilson Delgado Date: Wed, 17 Apr 2024 11:06:45 +0100 Subject: [PATCH] Mock downloader --- spec/lib/rmt/cli/mirror_spec.rb | 1 - spec/lib/rmt/mirror/base_spec.rb | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/lib/rmt/cli/mirror_spec.rb b/spec/lib/rmt/cli/mirror_spec.rb index e29e8b1cf..66f750dd3 100644 --- a/spec/lib/rmt/cli/mirror_spec.rb +++ b/spec/lib/rmt/cli/mirror_spec.rb @@ -31,7 +31,6 @@ include_examples 'handles lockfile exception' end - context 'suma product tree mirror with exception' do let(:suma_error) { 'mirroring SUMA failed' } let(:error_messages) { "Mirroring SUMA product tree failed: #{suma_error}." } diff --git a/spec/lib/rmt/mirror/base_spec.rb b/spec/lib/rmt/mirror/base_spec.rb index 6d7ed8a1c..000ffb0f7 100644 --- a/spec/lib/rmt/mirror/base_spec.rb +++ b/spec/lib/rmt/mirror/base_spec.rb @@ -32,6 +32,9 @@ describe '#mirror' do it 'mirrors repositories and licenses' do + allow(downloader).to receive(:downloaded_files_count) + allow(downloader).to receive(:downloaded_files_size) + expect(base).to receive(:mirror_implementation) expect(base).to receive(:cleanup_temp_dirs) base.mirror