summaryrefslogtreecommitdiff
path: root/spec/factories/ci/pipelines.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/ci/pipelines.rb')
-rw-r--r--spec/factories/ci/pipelines.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/factories/ci/pipelines.rb b/spec/factories/ci/pipelines.rb
index 85cdeaca12c..5bd5ab7d67a 100644
--- a/spec/factories/ci/pipelines.rb
+++ b/spec/factories/ci/pipelines.rb
@@ -65,6 +65,22 @@ FactoryBot.define do
add_attribute(:protected) { true }
end
+ trait :with_report_results do
+ status { :success }
+
+ after(:build) do |pipeline, evaluator|
+ pipeline.builds << build(:ci_build, :report_results, pipeline: pipeline, project: pipeline.project)
+ end
+ end
+
+ trait :with_codequality_report do
+ status { :success }
+
+ after(:build) do |pipeline, evaluator|
+ pipeline.builds << build(:ci_build, :codequality_report, pipeline: pipeline, project: pipeline.project)
+ end
+ end
+
trait :with_test_reports do
status { :success }