diff options
Diffstat (limited to 'spec/services/ci/archive_trace_service_spec.rb')
-rw-r--r-- | spec/services/ci/archive_trace_service_spec.rb | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/spec/services/ci/archive_trace_service_spec.rb b/spec/services/ci/archive_trace_service_spec.rb index 3fb9d092ae7..e7f489e841a 100644 --- a/spec/services/ci/archive_trace_service_spec.rb +++ b/spec/services/ci/archive_trace_service_spec.rb @@ -63,19 +63,6 @@ RSpec.describe Ci::ArchiveTraceService, '#execute', feature_category: :continuou end end - context 'when job does not have trace' do - let(:job) { create(:ci_build, :success) } - - it 'leaves a warning message in sidekiq log' do - expect(Sidekiq.logger).to receive(:warn).with( - class: Ci::ArchiveTraceWorker.name, - message: 'The job does not have live trace but going to be archived.', - job_id: job.id) - - subject - end - end - context 'when the job is out of archival attempts' do before do create(:ci_build_trace_metadata, @@ -149,23 +136,6 @@ RSpec.describe Ci::ArchiveTraceService, '#execute', feature_category: :continuou subject end end - - context 'when job failed to archive trace but did not raise an exception' do - before do - allow_next_instance_of(Gitlab::Ci::Trace) do |instance| - allow(instance).to receive(:archive!) {} - end - end - - it 'leaves a warning message in sidekiq log' do - expect(Sidekiq.logger).to receive(:warn).with( - class: Ci::ArchiveTraceWorker.name, - message: 'The job does not have archived trace after archiving.', - job_id: job.id) - - subject - end - end end context 'when job is running' do @@ -175,8 +145,8 @@ RSpec.describe Ci::ArchiveTraceService, '#execute', feature_category: :continuou expect(Gitlab::ErrorTracking) .to receive(:track_and_raise_for_dev_exception) .with(::Gitlab::Ci::Trace::ArchiveError, - issue_url: 'https://gitlab.com/gitlab-org/gitlab-foss/issues/51502', - job_id: job.id).once + issue_url: 'https://gitlab.com/gitlab-org/gitlab-foss/issues/51502', + job_id: job.id).once expect(Sidekiq.logger).to receive(:warn).with( class: Ci::ArchiveTraceWorker.name, |