diff options
author | Tiger <twatson@gitlab.com> | 2019-03-29 10:42:19 +1100 |
---|---|---|
committer | Tiger <twatson@gitlab.com> | 2019-04-02 13:31:26 +1100 |
commit | 3be46bdf086c4b11ec8c5eccae8d1c345127f2fc (patch) | |
tree | 4db0979be489e4ca78627e9509c860ab4983d48b /spec/lib/gitlab/ci/templates/templates_spec.rb | |
parent | ec5e032a12acd147708d6ef1a44d82efbc04d2d8 (diff) | |
download | gitlab-ce-3be46bdf086c4b11ec8c5eccae8d1c345127f2fc.tar.gz |
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.
Diffstat (limited to 'spec/lib/gitlab/ci/templates/templates_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/templates/templates_spec.rb | 6 |
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 |