diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-01 21:13:05 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-01 21:13:05 +0000 |
commit | 58acbd41a1ee5aa51777f2ef88ce03bd698530c7 (patch) | |
tree | 3dc36a5296cf53123f494a49892cbb8267d31907 /spec/lib/gitlab/ci/pipeline/duration_spec.rb | |
parent | ad1e76fb4d1392c890c8b5e218a256a416d5a50b (diff) | |
download | gitlab-ce-58acbd41a1ee5aa51777f2ef88ce03bd698530c7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/duration_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/duration_spec.rb | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/duration_spec.rb b/spec/lib/gitlab/ci/pipeline/duration_spec.rb index 088a901c80e..89c0ce46237 100644 --- a/spec/lib/gitlab/ci/pipeline/duration_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/duration_spec.rb @@ -210,31 +210,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Duration, feature_category: :continuous_int end end - context 'when feature flag ci_use_downstream_pipeline_duration_for_calculation is disabled' do - before do - stub_feature_flags(ci_use_downstream_pipeline_duration_for_calculation: false) - end - - it 'returns the duration of the running build' do - travel_to(current) do - expect(described_class.from_pipeline(pipeline)).to eq 1000.seconds - end - end - - context 'when there is no running build' do - let!(:running_build) { nil } - - it 'returns the duration for builds and bridges' do - travel_to(current) do - # 260 = 160 (see above) - # + success bridge build (60) + failed (60) + canceled (30) - # - overlapping (success & failed) (20) - overlapping (failed & canceled) (30) - expect(described_class.from_pipeline(pipeline)).to eq 260.seconds - end - end - end - end - # rubocop:disable RSpec/MultipleMemoizedHelpers context 'when there are downstream bridge jobs' do let_it_be(:success_direct_bridge) do @@ -282,29 +257,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Duration, feature_category: :continuous_int end end end - - context 'when feature flag ci_use_downstream_pipeline_duration_for_calculation is disabled' do - before do - stub_feature_flags(ci_use_downstream_pipeline_duration_for_calculation: false) - end - - it 'returns the duration of the running build' do - travel_to(current) do - expect(described_class.from_pipeline(pipeline)).to eq 1000.seconds - end - end - - context 'when there is no running build' do - let!(:running_build) { nil } - - it 'returns the duration for builds and bridges' do - travel_to(current) do - # 380 = 260 (see above) + success direct bridge (120) - expect(described_class.from_pipeline(pipeline)).to eq 380.seconds - end - end - end - end end # rubocop:enable RSpec/MultipleMemoizedHelpers end |