summaryrefslogtreecommitdiff
path: root/spec/factories/ci
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-02-18 11:47:35 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-02-18 11:50:11 +0100
commit8114786665a59526a988ce346393243996769aff (patch)
tree6e7f8a58021825a02d4465bfec3e8b449b9f2e35 /spec/factories/ci
parent0ae7c954537663aa2a574133e42d05eafe5db6fb (diff)
downloadgitlab-ce-8114786665a59526a988ce346393243996769aff.tar.gz
Fix builds scheduler when first build is allowed to fail
Before this fix when there was only one relevant, previous build and it failed, but was allowed to fail, entire build had been marked as skipped. Closes #3192
Diffstat (limited to 'spec/factories/ci')
-rw-r--r--spec/factories/ci/builds.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb
index 46a211fa60e..1243647a78d 100644
--- a/spec/factories/ci/builds.rb
+++ b/spec/factories/ci/builds.rb
@@ -28,6 +28,18 @@ FactoryGirl.define do
status 'canceled'
end
+ trait :running do
+ status 'running'
+ end
+
+ trait :pending do
+ status 'pending'
+ end
+
+ trait :allowed_to_fail do
+ allow_failure true
+ end
+
after(:build) do |build, evaluator|
build.project = build.commit.project
end