diff options
Diffstat (limited to 'spec/lib/gitlab/ci/yaml_processor_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/yaml_processor_spec.rb | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/spec/lib/gitlab/ci/yaml_processor_spec.rb b/spec/lib/gitlab/ci/yaml_processor_spec.rb index 0b34e887716..62adba4319e 100644 --- a/spec/lib/gitlab/ci/yaml_processor_spec.rb +++ b/spec/lib/gitlab/ci/yaml_processor_spec.rb @@ -1647,48 +1647,6 @@ module Gitlab it { expect { subject }.to raise_error(Gitlab::Ci::YamlProcessor::ValidationError, /is not defined in prior stages/) } end - - context 'when trigger job includes artifact generated by a dependency' do - context 'when dependency is defined in previous stages' do - let(:config) do - { - build1: { stage: 'build', script: 'test' }, - test1: { stage: 'test', trigger: { - include: [{ job: 'build1', artifact: 'generated.yml' }] - } } - } - end - - it { expect { subject }.not_to raise_error } - end - - context 'when dependency is defined in later stages' do - let(:config) do - { - build1: { stage: 'build', script: 'test' }, - test1: { stage: 'test', trigger: { - include: [{ job: 'deploy1', artifact: 'generated.yml' }] - } }, - deploy1: { stage: 'deploy', script: 'test' } - } - end - - it { expect { subject }.to raise_error(Gitlab::Ci::YamlProcessor::ValidationError, /is not defined in prior stages/) } - end - - context 'when dependency is not defined' do - let(:config) do - { - build1: { stage: 'build', script: 'test' }, - test1: { stage: 'test', trigger: { - include: [{ job: 'non-existent', artifact: 'generated.yml' }] - } } - } - end - - it { expect { subject }.to raise_error(Gitlab::Ci::YamlProcessor::ValidationError, /undefined dependency: non-existent/) } - end - end end describe "Job Needs" do @@ -2094,34 +2052,6 @@ module Gitlab end end - describe 'with trigger:include' do - context 'when artifact and job are specified' do - let(:config) do - YAML.dump({ - build1: { stage: 'build', script: 'test' }, - test1: { stage: 'test', trigger: { - include: [{ artifact: 'generated.yml', job: 'build1' }] - } } - }) - end - - it { expect { subject }.not_to raise_error } - end - - context 'when artifact is specified without job' do - let(:config) do - YAML.dump({ - build1: { stage: 'build', script: 'test' }, - test1: { stage: 'test', trigger: { - include: [{ artifact: 'generated.yml' }] - } } - }) - end - - it { expect { subject }.to raise_error(Gitlab::Ci::YamlProcessor::ValidationError, /must specify the job where to fetch the artifact from/) } - end - end - describe "Error handling" do it "fails to parse YAML" do expect do |