diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-07-31 17:36:57 +0200 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-08-04 19:42:29 +0200 |
commit | 16084ee9d3fdfc333a113e4cbcd3f6d2fc402628 (patch) | |
tree | d91c401dda30bc3a015161488aaf2fcb6808a661 /spec/lib/gitlab/ci/pipeline | |
parent | bce8b66d516e906f6131d8a6dcae797def5288b6 (diff) | |
download | gitlab-ce-16084ee9d3fdfc333a113e4cbcd3f6d2fc402628.tar.gz |
Port changes from EEmc/feature/pipeline-tracking-config-ce
Ports changes from
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/12343
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/seed/build_spec.rb | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb index 762025f9bd9..1b8e86b1f18 100644 --- a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb @@ -20,20 +20,36 @@ describe Gitlab::Ci::Pipeline::Seed::Build do describe '#bridge?' do subject { seed_build.bridge? } - context 'when job is a bridge' do + context 'when job is a downstream bridge' do let(:attributes) do { name: 'rspec', ref: 'master', options: { trigger: 'my/project' } } end it { is_expected.to be_truthy } + + context 'when trigger definition is empty' do + let(:attributes) do + { name: 'rspec', ref: 'master', options: { trigger: '' } } + end + + it { is_expected.to be_falsey } + end end - context 'when trigger definition is empty' do + context 'when job is an upstream bridge' do let(:attributes) do - { name: 'rspec', ref: 'master', options: { trigger: '' } } + { name: 'rspec', ref: 'master', options: { bridge_needs: { pipeline: 'my/project' } } } end - it { is_expected.to be_falsey } + it { is_expected.to be_truthy } + + context 'when upstream definition is empty' do + let(:attributes) do + { name: 'rspec', ref: 'master', options: { bridge_needs: { pipeline: '' } } } + end + + it { is_expected.to be_falsey } + end end context 'when job is not a bridge' do |