Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/ci/pipelines.rb')
-rw-r--r--spec/factories/ci/pipelines.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/ci/pipelines.rb b/spec/factories/ci/pipelines.rb
index 0b3653a01ed..85cdeaca12c 100644
--- a/spec/factories/ci/pipelines.rb
+++ b/spec/factories/ci/pipelines.rb
@@ -21,6 +21,12 @@ FactoryBot.define do
end
factory :ci_pipeline do
+ transient { ci_ref_presence { true } }
+
+ after(:build) do |pipeline, evaluator|
+ pipeline.ensure_ci_ref! if evaluator.ci_ref_presence && pipeline.ci_ref_id.nil?
+ end
+
trait :invalid do
status { :failed }
yaml_errors { 'invalid YAML' }
@@ -104,6 +110,7 @@ FactoryBot.define do
after(:build) do |pipeline, evaluator|
pipeline.builds << build(:ci_build, :terraform_reports, pipeline: pipeline, project: pipeline.project)
+ pipeline.builds << build(:ci_build, :terraform_reports, pipeline: pipeline, project: pipeline.project)
end
end
@@ -155,6 +162,11 @@ FactoryBot.define do
source_sha { merge_request.source_branch_sha }
target_sha { merge_request.target_branch_sha }
end
+
+ trait :webide do
+ source { :webide }
+ config_source { :webide_source }
+ end
end
end
end