summaryrefslogtreecommitdiff
path: root/spec/factories/ci/builds.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-02-16 13:13:10 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-02-16 13:13:10 +0100
commit953e590b18289005c69b72575ae6f38161ffa11b (patch)
treed47e5a38ae58163d055f6692112d6a1ac6b073c5 /spec/factories/ci/builds.rb
parent658c5f32a3eac2f4a478e84ad767ba000041b461 (diff)
downloadgitlab-ce-953e590b18289005c69b72575ae6f38161ffa11b.tar.gz
Make build clone/retry implementation more robustfix/gb/pipeline-retry-builds-started
Diffstat (limited to 'spec/factories/ci/builds.rb')
-rw-r--r--spec/factories/ci/builds.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb
index 0397d5d4001..4f671091afc 100644
--- a/spec/factories/ci/builds.rb
+++ b/spec/factories/ci/builds.rb
@@ -89,8 +89,9 @@ FactoryGirl.define do
tag true
end
- factory :ci_build_with_coverage do
+ trait :coverage do
coverage 99.9
+ coverage_regex '/(d+)/'
end
trait :trace do
@@ -99,6 +100,16 @@ FactoryGirl.define do
end
end
+ trait :erased do
+ erased_at Time.now
+ erased_by factory: :user
+ end
+
+ trait :queued do
+ queued_at Time.now
+ runner factory: :ci_runner
+ end
+
trait :artifacts do
after(:create) do |build, _|
build.artifacts_file =