diff options
Diffstat (limited to 'spec/support/shared_examples/lib/gitlab/ci/ci_trace_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/lib/gitlab/ci/ci_trace_shared_examples.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/shared_examples/lib/gitlab/ci/ci_trace_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/ci/ci_trace_shared_examples.rb index 0df1af3b10a..9c95d1ff9d9 100644 --- a/spec/support/shared_examples/lib/gitlab/ci/ci_trace_shared_examples.rb +++ b/spec/support/shared_examples/lib/gitlab/ci/ci_trace_shared_examples.rb @@ -843,6 +843,17 @@ RSpec.shared_examples 'trace with enabled live trace feature' do expect { subject }.to raise_error(Gitlab::Ci::Trace::AlreadyArchivedError) expect(build.job_artifacts_trace.file.exists?).to be_truthy end + + context 'when live trace chunks still exist' do + before do + create(:ci_build_trace_chunk, build: build) + end + + it 'removes the traces' do + expect { subject }.to raise_error(Gitlab::Ci::Trace::AlreadyArchivedError) + expect(build.trace_chunks).to be_empty + end + end end context 'when job is not finished yet' do |