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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-13 18:10:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-13 18:10:03 +0300
commit6df7943512ca90323c69b926404cc561b6305ce2 (patch)
tree5dbdb697f641358516ddae9b45ab8bae5d58de81 /spec/services/ci/pipeline_processing
parent5605efec12c99adf88f641391cb879dedf8fa05e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/ci/pipeline_processing')
-rw-r--r--spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb10
-rw-r--r--spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb35
-rw-r--r--spec/services/ci/pipeline_processing/shared_processing_service.rb3
-rw-r--r--spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb2
4 files changed, 3 insertions, 47 deletions
diff --git a/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb b/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb
index a10a333b462..bc8b6b2d113 100644
--- a/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb
+++ b/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb
@@ -5,20 +5,12 @@ require_relative 'shared_processing_service.rb'
require_relative 'shared_processing_service_tests_with_yaml.rb'
RSpec.describe Ci::PipelineProcessing::AtomicProcessingService do
- before do
- stub_feature_flags(ci_atomic_processing: true)
-
- # This feature flag is implicit
- # Atomic Processing does not process statuses differently
- stub_feature_flags(ci_composite_status: true)
- end
-
it_behaves_like 'Pipeline Processing Service'
it_behaves_like 'Pipeline Processing Service Tests With Yaml'
private
- def process_pipeline(initial_process: false)
+ def process_pipeline
described_class.new(pipeline).execute
end
end
diff --git a/spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb b/spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb
deleted file mode 100644
index 569a6d62dc1..00000000000
--- a/spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_relative 'shared_processing_service.rb'
-require_relative 'shared_processing_service_tests_with_yaml.rb'
-
-RSpec.describe Ci::PipelineProcessing::LegacyProcessingService do
- before do
- stub_feature_flags(ci_atomic_processing: false)
- end
-
- context 'when ci_composite_status is enabled' do
- before do
- stub_feature_flags(ci_composite_status: true)
- end
-
- it_behaves_like 'Pipeline Processing Service'
- it_behaves_like 'Pipeline Processing Service Tests With Yaml'
- end
-
- context 'when ci_composite_status is disabled' do
- before do
- stub_feature_flags(ci_composite_status: false)
- end
-
- it_behaves_like 'Pipeline Processing Service'
- it_behaves_like 'Pipeline Processing Service Tests With Yaml'
- end
-
- private
-
- def process_pipeline(initial_process: false)
- described_class.new(pipeline).execute(initial_process: initial_process)
- end
-end
diff --git a/spec/services/ci/pipeline_processing/shared_processing_service.rb b/spec/services/ci/pipeline_processing/shared_processing_service.rb
index 224066885b6..7de22b6a4cc 100644
--- a/spec/services/ci/pipeline_processing/shared_processing_service.rb
+++ b/spec/services/ci/pipeline_processing/shared_processing_service.rb
@@ -788,8 +788,7 @@ RSpec.shared_examples 'Pipeline Processing Service' do
let!(:deploy_pages) { create_build('deploy_pages', stage: 'deploy', stage_idx: 2, scheduling_type: :dag) }
it 'runs deploy_pages without waiting prior stages' do
- # Ci::PipelineProcessing::LegacyProcessingService requires :initial_process parameter
- expect(process_pipeline(initial_process: true)).to be_truthy
+ expect(process_pipeline).to be_truthy
expect(stages).to eq(%w(pending created pending))
expect(builds.pending).to contain_exactly(linux_build, mac_build, deploy_pages)
diff --git a/spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb b/spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb
index 17d254ba48e..77645298bc7 100644
--- a/spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb
+++ b/spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb
@@ -42,7 +42,7 @@ RSpec.shared_context 'Pipeline Processing Service Tests With Yaml' do
{
pipeline: pipeline.status,
- stages: pipeline.ordered_stages.pluck(:name, :status).to_h,
+ stages: pipeline.stages.pluck(:name, :status).to_h,
jobs: pipeline.statuses.latest.pluck(:name, :status).to_h
}
end