diff options
author | Sean McGivern <sean@gitlab.com> | 2019-08-02 17:51:20 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-08-02 17:51:20 +0300 |
commit | 8156e77c1a25bc6050e5036fa3bbfd29201a6d5c (patch) | |
tree | 16345b3f34d3e936c5bb64d3d0710e7454927974 /spec | |
parent | eb2d4adf38726da62f62e850d181cedf12c64c5e (diff) | |
parent | 181b9b3e7328070f6846c9547d166ba0128e415c (diff) |
Merge branch 'respect-needs-on-artifacts' into 'master'
Respect needs on artifacts
Closes #65466
See merge request gitlab-org/gitlab-ce!31413
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/ci/build_spec.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 8768e914284..0387073cffb 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -630,12 +630,17 @@ describe Ci::Build do create(:ci_build, pipeline: pipeline, name: 'final', stage_idx: 3, stage: 'deploy', options: { - dependencies: dependencies, - needs: needs + dependencies: dependencies } ) end + before do + needs.to_a.each do |need| + create(:ci_build_need, build: final, name: need) + end + end + subject { final.dependencies } context 'when depedencies are defined' do @@ -648,6 +653,14 @@ describe Ci::Build do let(:needs) { %w(build rspec staging) } it { is_expected.to contain_exactly(build, rspec_test, staging) } + + context 'when ci_dag_support is disabled' do + before do + stub_feature_flags(ci_dag_support: false) + end + + it { is_expected.to contain_exactly(build, rspec_test, rubocop_test, staging) } + end end context 'when needs and dependencies are defined' do |