diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-06-04 08:12:45 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-06-06 11:49:48 +0300 |
commit | cae17352761d9c34de444cb95e77d8fa1a8bd56a (patch) | |
tree | ce1014973a38f097b0f983444317ff7513d7ae8e /spec | |
parent | f9b821f08dfc8feee2ed8a06c8f21c85c3c9d2ec (diff) |
Fix typos and add a small spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/ci/build_spec.rb | 2 | ||||
-rw-r--r-- | spec/support/shared_examples/ci_trace_shared_examples.rb | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 1b26c8d3b49..0a0d7d3fea9 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -130,7 +130,7 @@ describe Ci::Build do context 'when build does not have live trace' do let!(:build) { create(:ci_build, :success, :trace_artifact) } - it 'selects the build' do + it 'does not select the build' do is_expected.to be_empty end end diff --git a/spec/support/shared_examples/ci_trace_shared_examples.rb b/spec/support/shared_examples/ci_trace_shared_examples.rb index 59efce1b5f0..6dbe0f6f980 100644 --- a/spec/support/shared_examples/ci_trace_shared_examples.rb +++ b/spec/support/shared_examples/ci_trace_shared_examples.rb @@ -246,12 +246,14 @@ shared_examples_for 'common trace features' do expect(build.job_artifacts_trace).to be_exist end - context 'when anothe process had already been archiving', :clean_gitlab_redis_shared_state do + context 'when another process has already been archiving', :clean_gitlab_redis_shared_state do before do Gitlab::ExclusiveLease.new("trace:archive:#{trace.job.id}", timeout: 1.hour).try_obtain end - it 'prevents to archive concurently' do + it 'blocks concurrent archiving' do + expect(Rails.logger).to receive(:error).with('Cannot obtain an exclusive lease. There must be another instance already in execution.') + subject build.reload |