summaryrefslogtreecommitdiff
path: root/spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb
blob: fd491bf461b5bae76c9fb3b1734694c1ee56cecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# frozen_string_literal: true

require 'spec_helper'
require_relative 'shared_processing_service.rb'
require_relative 'shared_processing_service_tests_with_yaml.rb'

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