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:
authorShinya Maeda <shinya@gitlab.com>2018-11-29 08:51:03 +0300
committerShinya Maeda <shinya@gitlab.com>2018-11-29 08:51:03 +0300
commitaf5bf56857bd6e88bc9ea3322a0873ff6767de69 (patch)
tree206afaf4ef6cbe958d69d730f179651d621302c2 /spec/services
parent3fbd48e127053517e9ee0f6307989758a4d59f9a (diff)
Improve spec
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/ci/archive_trace_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/ci/archive_trace_service_spec.rb b/spec/services/ci/archive_trace_service_spec.rb
index 6389d7a921f..989aab60113 100644
--- a/spec/services/ci/archive_trace_service_spec.rb
+++ b/spec/services/ci/archive_trace_service_spec.rb
@@ -11,6 +11,18 @@ describe Ci::ArchiveTraceService, '#execute' do
expect(job.reload.job_artifacts_trace).to be_exist
end
+
+ context 'when trace is already archived' do
+ let!(:job) { create(:ci_build, :success, :trace_artifact) }
+
+ it 'ignores an exception' do
+ expect { subject }.not_to raise_error
+ end
+
+ it 'does not create an archived trace' do
+ expect { subject }.not_to change { Ci::JobArtifact.trace.count }
+ end
+ end
end
context 'when job is running' do