2015-10-06 06:01:16 -04:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :commit_status, class: CommitStatus do
|
|
|
|
name 'default'
|
|
|
|
status 'success'
|
|
|
|
description 'commit status'
|
2016-06-03 10:22:26 -04:00
|
|
|
pipeline factory: :ci_pipeline_with_one_job
|
2016-01-26 09:23:57 -05:00
|
|
|
started_at 'Tue, 26 Jan 2016 08:21:42 +0100'
|
2016-01-26 02:32:36 -05:00
|
|
|
finished_at 'Tue, 26 Jan 2016 08:23:42 +0100'
|
|
|
|
|
2016-08-11 09:22:35 -04:00
|
|
|
trait :success do
|
|
|
|
status 'success'
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :failed do
|
|
|
|
status 'failed'
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :canceled do
|
|
|
|
status 'canceled'
|
|
|
|
end
|
|
|
|
|
2016-11-18 12:02:49 -05:00
|
|
|
trait :skipped do
|
|
|
|
status 'skipped'
|
|
|
|
end
|
|
|
|
|
2016-08-11 09:22:35 -04:00
|
|
|
trait :running do
|
|
|
|
status 'running'
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :pending do
|
|
|
|
status 'pending'
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :created do
|
|
|
|
status 'created'
|
|
|
|
end
|
|
|
|
|
2017-03-06 07:54:29 -05:00
|
|
|
trait :manual do
|
|
|
|
status 'manual'
|
|
|
|
end
|
|
|
|
|
2016-01-26 02:32:36 -05:00
|
|
|
after(:build) do |build, evaluator|
|
2016-06-03 07:09:49 -04:00
|
|
|
build.project = build.pipeline.project
|
2016-01-26 02:32:36 -05:00
|
|
|
end
|
2015-10-06 06:01:16 -04:00
|
|
|
|
|
|
|
factory :generic_commit_status, class: GenericCommitStatus do
|
|
|
|
name 'generic'
|
|
|
|
description 'external commit status'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|