diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-18 11:47:35 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-18 11:50:11 +0100 |
commit | 8114786665a59526a988ce346393243996769aff (patch) | |
tree | 6e7f8a58021825a02d4465bfec3e8b449b9f2e35 /spec/factories/ci | |
parent | 0ae7c954537663aa2a574133e42d05eafe5db6fb (diff) | |
download | gitlab-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.rb | 12 |
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 |