diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/lib/gitlab/ci/lint_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/lib/gitlab/ci/lint_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/lint_spec.rb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/spec/lib/gitlab/ci/lint_spec.rb b/spec/lib/gitlab/ci/lint_spec.rb index 747ff13c840..7e0b2b5aa8e 100644 --- a/spec/lib/gitlab/ci/lint_spec.rb +++ b/spec/lib/gitlab/ci/lint_spec.rb @@ -62,7 +62,7 @@ RSpec.describe Gitlab::Ci::Lint do end end - shared_examples 'sets merged yaml' do + shared_examples 'sets config metadata' do let(:content) do <<~YAML :include: @@ -106,6 +106,20 @@ RSpec.describe Gitlab::Ci::Lint do expect(subject.merged_yaml).to eq(expected_config.to_yaml) end + + it 'sets includes' do + expect(subject.includes).to contain_exactly( + { + type: :local, + location: 'another-gitlab-ci.yml', + blob: "http://localhost/#{project.full_path}/-/blob/#{project.commit.sha}/another-gitlab-ci.yml", + raw: "http://localhost/#{project.full_path}/-/raw/#{project.commit.sha}/another-gitlab-ci.yml", + extra: {}, + context_project: project.full_path, + context_sha: project.commit.sha + } + ) + end end shared_examples 'content with errors and warnings' do @@ -220,7 +234,7 @@ RSpec.describe Gitlab::Ci::Lint do end end - it_behaves_like 'sets merged yaml' + it_behaves_like 'sets config metadata' include_context 'advanced validations' do it 'does not catch advanced logical errors' do @@ -275,7 +289,7 @@ RSpec.describe Gitlab::Ci::Lint do end end - it_behaves_like 'sets merged yaml' + it_behaves_like 'sets config metadata' include_context 'advanced validations' do it 'runs advanced logical validations' do |