summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-04-03 09:05:28 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-04-03 09:05:28 +0000
commit478077747da82a3dfaafbebc1797b26b965b030f (patch)
tree148071084973e54a6e867545e96acffde9508fa0 /spec/lib
parentc3c5190c014bf8509ba44f326be3b43ccb989beb (diff)
parent343e834330309b200c2d629ec6a4a2de2e5f29c3 (diff)
downloadgitlab-ce-478077747da82a3dfaafbebc1797b26b965b030f.tar.gz
Merge branch '47234-composable-auto-devops' into 'master'
Resolve "Composable Auto DevOps" Closes #47234 See merge request gitlab-org/gitlab-ce!26520
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/ci/templates/templates_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/templates/templates_spec.rb b/spec/lib/gitlab/ci/templates/templates_spec.rb
index fbbd58280a9..e20a621168c 100644
--- a/spec/lib/gitlab/ci/templates/templates_spec.rb
+++ b/spec/lib/gitlab/ci/templates/templates_spec.rb
@@ -4,6 +4,7 @@ require 'spec_helper'
describe "CI YML Templates" do
ABSTRACT_TEMPLATES = %w[Serverless].freeze
+ PROJECT_DEPENDENT_TEMPLATES = %w[Auto-DevOps].freeze
def self.concrete_templates
Gitlab::Template::GitlabCiYmlTemplate.all.reject do |template|
@@ -20,7 +21,10 @@ describe "CI YML Templates" do
describe 'concrete templates with CI/CD jobs' do
concrete_templates.each do |template|
it "#{template.name} template should be valid" do
- expect { Gitlab::Ci::YamlProcessor.new(template.content) }
+ # Trigger processing of included files
+ project = create(:project, :test_repo) if PROJECT_DEPENDENT_TEMPLATES.include?(template.name)
+
+ expect { Gitlab::Ci::YamlProcessor.new(template.content, project: project) }
.not_to raise_error
end
end