diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/models/ci/build_dependencies_spec.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/models/ci/build_dependencies_spec.rb')
-rw-r--r-- | spec/models/ci/build_dependencies_spec.rb | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/spec/models/ci/build_dependencies_spec.rb b/spec/models/ci/build_dependencies_spec.rb index e343ec0e698..d00d88ae397 100644 --- a/spec/models/ci/build_dependencies_spec.rb +++ b/spec/models/ci/build_dependencies_spec.rb @@ -18,12 +18,8 @@ RSpec.describe Ci::BuildDependencies do let!(:rubocop_test) { create(:ci_build, pipeline: pipeline, name: 'rubocop', stage_idx: 1, stage: 'test') } let!(:staging) { create(:ci_build, pipeline: pipeline, name: 'staging', stage_idx: 2, stage: 'deploy') } - before do - stub_feature_flags(ci_validate_build_dependencies_override: false) - end - - describe '#local' do - subject { described_class.new(job).local } + context 'for local dependencies' do + subject { described_class.new(job).all } describe 'jobs from previous stages' do context 'when job is in the first stage' do @@ -52,7 +48,7 @@ RSpec.describe Ci::BuildDependencies do project.add_developer(user) end - let(:retried_job) { Ci::Build.retry(rspec_test, user) } + let!(:retried_job) { Ci::Build.retry(rspec_test, user) } it 'contains the retried job instead of the original one' do is_expected.to contain_exactly(build, retried_job, rubocop_test) @@ -150,7 +146,7 @@ RSpec.describe Ci::BuildDependencies do end end - describe '#cross_pipeline' do + context 'for cross_pipeline dependencies' do let!(:job) do create(:ci_build, pipeline: pipeline, @@ -160,7 +156,7 @@ RSpec.describe Ci::BuildDependencies do subject { described_class.new(job) } - let(:cross_pipeline_deps) { subject.cross_pipeline } + let(:cross_pipeline_deps) { subject.all } context 'when dependency specifications are valid' do context 'when pipeline exists in the hierarchy' do @@ -378,14 +374,6 @@ RSpec.describe Ci::BuildDependencies do end it { is_expected.to eq(false) } - - context 'when ci_validate_build_dependencies_override feature flag is enabled' do - before do - stub_feature_flags(ci_validate_build_dependencies_override: job.project) - end - - it { is_expected.to eq(true) } - end end end end |