Commit 71601000 authored by Kamil Trzciński's avatar Kamil Trzciński

Improve `sast` usage

parent 2ac65b13
......@@ -7,8 +7,6 @@ module EE
module Build
extend ActiveSupport::Concern
LICENSE_MANAGEMENT_FILE = 'gl-license-management-report.json'.freeze
LICENSED_PARSER_FEATURES = {
sast: :sast
}.with_indifferent_access.freeze
......
......@@ -15,18 +15,7 @@ describe Projects::PipelinesController do
context 'with a sast artifact' do
before do
create(
:ci_build,
:success,
:artifacts,
name: 'sast',
pipeline: pipeline,
options: {
artifacts: {
paths: [Ci::JobArtifact::DEFAULT_FILE_NAMES[:sast]]
}
}
)
create(:ci_build, :legacy_sast, pipeline: pipeline)
end
context 'with feature enabled' do
......
......@@ -18,18 +18,7 @@ describe 'Pipeline', :js do
context 'with a sast artifact' do
before do
create(
:ci_build,
:success,
:artifacts,
name: 'sast',
pipeline: pipeline,
options: {
artifacts: {
paths: [Ci::JobArtifact::DEFAULT_FILE_NAMES[:sast]]
}
}
)
create(:ci_build, :legacy_sast, pipeline: pipeline)
visit security_project_pipeline_path(project, pipeline)
end
......@@ -66,18 +55,7 @@ describe 'Pipeline', :js do
context 'with a license management artifact' do
before do
create(
:ci_build,
:success,
:artifacts,
name: 'license_management',
pipeline: pipeline,
options: {
artifacts: {
paths: [Ci::Build::LICENSE_MANAGEMENT_FILE]
}
}
)
create(:ee_ci_build, :legacy_license_management, pipeline: pipeline)
visit licenses_project_pipeline_path(project, pipeline)
end
......
......@@ -28,18 +28,7 @@ describe Ci::Pipeline do
let(:pipeline_5) { create(:ci_pipeline_without_jobs, project: project) }
before do
create(
:ci_build,
:success,
:artifacts,
name: 'sast',
pipeline: pipeline_1,
options: {
artifacts: {
paths: [Ci::JobArtifact::DEFAULT_FILE_NAMES[:sast]]
}
}
)
create(:ci_build, :legacy_sast, pipeline: pipeline_1)
create(
:ci_build,
:success,
......
......@@ -1503,30 +1503,8 @@ describe Project do
let(:pipeline_3) { create(:ci_pipeline_without_jobs, project: project) }
before do
create(
:ci_build,
:success,
:artifacts,
name: 'sast',
pipeline: pipeline_1,
options: {
artifacts: {
paths: [Ci::JobArtifact::DEFAULT_FILE_NAMES[:sast]]
}
}
)
create(
:ci_build,
:success,
:artifacts,
name: 'sast',
pipeline: pipeline_2,
options: {
artifacts: {
paths: [Ci::JobArtifact::DEFAULT_FILE_NAMES[:sast]]
}
}
)
create(:ci_build, :legacy_sast, pipeline: pipeline_1)
create(:ci_build, :legacy_sast, pipeline: pipeline_2)
end
it "returns the latest pipeline with security reports" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment