diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/ci/bridge.rb | 10 | ||||
-rw-r--r-- | spec/features/projects/pipelines/pipeline_spec.rb | 3 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/seed/build_spec.rb | 16 |
3 files changed, 10 insertions, 19 deletions
diff --git a/spec/factories/ci/bridge.rb b/spec/factories/ci/bridge.rb index b1d82b98411..183f2399ba5 100644 --- a/spec/factories/ci/bridge.rb +++ b/spec/factories/ci/bridge.rb @@ -14,16 +14,8 @@ FactoryBot.define do yaml_variables [{ key: 'BRIDGE', value: 'cross', public: true }] end - transient { downstream nil } - - after(:build) do |bridge, evaluator| + after(:build) do |bridge, _| bridge.project ||= bridge.pipeline.project - - if evaluator.downstream.present? - bridge.options = bridge.options.to_h.merge( - trigger: { project: evaluator.downstream.full_path } - ) - end end end end diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index b197557039d..0de5d50df59 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -476,8 +476,7 @@ describe 'Pipeline', :js do let!(:bridge) do create(:ci_bridge, pipeline: pipeline, name: 'cross-build', - user: user, - downstream: downstream) + user: user) end describe 'GET /:project/pipelines/:id' do diff --git a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb index fae8add6453..d2f53780344 100644 --- a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb @@ -21,20 +21,20 @@ describe Gitlab::Ci::Pipeline::Seed::Build do end describe '#bridge?' do - 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_bridge } - end - context 'when trigger definition is empty' do - let(:attributes) do - { name: 'rspec', ref: 'master', options: { trigger: '' } } - end + context 'when trigger definition is empty' do + let(:attributes) do + { name: 'rspec', ref: 'master', options: { trigger: '' } } + end - it { is_expected.not_to be_bridge } + it { is_expected.not_to be_bridge } + end end context 'when job is not a bridge' do @@ -50,7 +50,7 @@ describe Gitlab::Ci::Pipeline::Seed::Build do end end - 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 |