diff options
Diffstat (limited to 'spec/factories/ci/pipelines.rb')
-rw-r--r-- | spec/factories/ci/pipelines.rb | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/factories/ci/pipelines.rb b/spec/factories/ci/pipelines.rb index 86a8b008e48..e0d7ad3c133 100644 --- a/spec/factories/ci/pipelines.rb +++ b/spec/factories/ci/pipelines.rb @@ -101,6 +101,22 @@ FactoryBot.define do end end + trait :with_sast_report do + status { :success } + + after(:build) do |pipeline, evaluator| + pipeline.builds << build(:ci_build, :sast_report, pipeline: pipeline, project: pipeline.project) + end + end + + trait :with_secret_detection_report do + status { :success } + + after(:build) do |pipeline, evaluator| + pipeline.builds << build(:ci_build, :secret_detection_report, pipeline: pipeline, project: pipeline.project) + end + end + trait :with_test_reports do status { :success } @@ -159,7 +175,13 @@ FactoryBot.define do trait :with_coverage_report_artifact do after(:build) do |pipeline, evaluator| - pipeline.pipeline_artifacts << build(:ci_pipeline_artifact, pipeline: pipeline, project: pipeline.project) + pipeline.pipeline_artifacts << build(:ci_pipeline_artifact, :with_coverage_report, pipeline: pipeline, project: pipeline.project) + end + end + + trait :with_codequality_mr_diff_report do + after(:build) do |pipeline, evaluator| + pipeline.pipeline_artifacts << build(:ci_pipeline_artifact, :with_codequality_mr_diff_report, pipeline: pipeline, project: pipeline.project) end end |