From 3be46bdf086c4b11ec8c5eccae8d1c345127f2fc Mon Sep 17 00:00:00 2001 From: Tiger Date: Fri, 29 Mar 2019 10:42:19 +1100 Subject: Split Security Auto DevOps jobs into templates Container Scanning, Dependency Scanning, License Management and SAST parts of Auto DevOps now use the preexisting templates. Auto DevOps and the DAST job template will now use a shared job template instead of maintaining two copies of the job. This also allows Auto DevOps to use custom authentication with DAST. --- spec/lib/gitlab/ci/templates/templates_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'spec/lib') 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 -- cgit v1.2.1