diff options
Diffstat (limited to 'spec/lib/gitlab/ci/yaml_processor_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/yaml_processor_spec.rb | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/spec/lib/gitlab/ci/yaml_processor_spec.rb b/spec/lib/gitlab/ci/yaml_processor_spec.rb index 5cfd8d9b9fb..81bc8c7ab9a 100644 --- a/spec/lib/gitlab/ci/yaml_processor_spec.rb +++ b/spec/lib/gitlab/ci/yaml_processor_spec.rb @@ -794,28 +794,6 @@ module Gitlab it_behaves_like 'returns errors', 'test_job_1 has the following needs duplicated: test_job_2.' end - - context 'when needed job name is too long' do - let(:job_name) { 'a' * (::Ci::BuildNeed::MAX_JOB_NAME_LENGTH + 1) } - - let(:config) do - <<-EOYML - lint_job: - script: 'echo lint_job' - rules: - - if: $var == null - needs: [#{job_name}] - #{job_name}: - script: 'echo job' - EOYML - end - - it 'returns an error' do - expect(subject.errors).to include( - "lint_job job: need `#{job_name}` name is too long (maximum is #{::Ci::BuildNeed::MAX_JOB_NAME_LENGTH} characters)" - ) - end - end end context 'rule needs as hash' do @@ -3659,7 +3637,8 @@ module Gitlab context 'when a project ref does not contain the forked commit sha' do it 'returns an error' do is_expected.not_to be_valid - expect(subject.errors).to include(/Could not validate configuration/) + expect(subject.errors).to include( + /configuration originates from an external project or a commit not associated with a Git reference/) end it_behaves_like 'when the processor is executed twice consecutively' |