diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-06-01 10:25:17 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-06-06 11:49:48 +0300 |
commit | 4064481501a24d31872914c845f5d8c2cfc08040 (patch) | |
tree | 6ef6ed4e7dd19f19e083c4e9b5d6615a9afe2b5e /spec/models/ci | |
parent | 2522691eda46ef3ed572b747074e9b3b2e776198 (diff) |
Rename find_stale_in_batches to find_builds_from_stale_live_trace. Fix comments
Diffstat (limited to 'spec/models/ci')
-rw-r--r-- | spec/models/ci/build_trace_chunk_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/ci/build_trace_chunk_spec.rb b/spec/models/ci/build_trace_chunk_spec.rb index 246152d1c8f..5d524d7cf49 100644 --- a/spec/models/ci/build_trace_chunk_spec.rb +++ b/spec/models/ci/build_trace_chunk_spec.rb @@ -35,8 +35,8 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do end end - describe '.find_stale_in_batches' do - subject { described_class.find_stale_in_batches } + describe '.find_builds_from_stale_live_trace' do + subject { described_class.find_builds_from_stale_live_trace } context 'when build status is finished' do context 'when build finished 2 days ago' do @@ -44,7 +44,7 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do let!(:build) { create(:ci_build, :success, :trace_artifact, finished_at: 2.days.ago) } it 'does not yield build id' do - expect { |b| described_class.find_stale_in_batches(&b) }.not_to yield_control + expect { |b| described_class.find_builds_from_stale_live_trace(&b) }.not_to yield_control end end @@ -52,7 +52,7 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do let!(:build) { create(:ci_build, :success, :trace_live, finished_at: 2.days.ago) } it 'yields build id' do - expect { |b| described_class.find_stale_in_batches(&b) }.to yield_with_args([build.id]) + expect { |b| described_class.find_builds_from_stale_live_trace(&b) }.to yield_with_args([build.id]) end end end @@ -61,7 +61,7 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do let!(:build) { create(:ci_build, :success, :trace_live, finished_at: 10.minutes.ago) } it 'does not yield build id' do - expect { |b| described_class.find_stale_in_batches(&b) }.not_to yield_control + expect { |b| described_class.find_builds_from_stale_live_trace(&b) }.not_to yield_control end end end @@ -70,7 +70,7 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do let!(:build) { create(:ci_build, :running, :trace_live) } it 'does not yield build id' do - expect { |b| described_class.find_stale_in_batches(&b) }.not_to yield_control + expect { |b| described_class.find_builds_from_stale_live_trace(&b) }.not_to yield_control end end end |