2019-07-25 05:11:48 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-12-14 00:13:44 +00:00
|
|
|
FactoryBot.define do
|
2015-10-06 10:01:16 +00:00
|
|
|
factory :commit_status, class: CommitStatus do
|
2019-10-02 00:06:26 +00:00
|
|
|
name { 'default' }
|
|
|
|
stage { 'test' }
|
|
|
|
stage_idx { 0 }
|
|
|
|
status { 'success' }
|
|
|
|
description { 'commit status'}
|
2019-11-13 12:06:22 +00:00
|
|
|
pipeline factory: :ci_pipeline
|
2019-10-02 00:06:26 +00:00
|
|
|
started_at { 'Tue, 26 Jan 2016 08:21:42 +0100'}
|
|
|
|
finished_at { 'Tue, 26 Jan 2016 08:23:42 +0100'}
|
2016-01-26 07:32:36 +00:00
|
|
|
|
2016-08-11 13:22:35 +00:00
|
|
|
trait :success do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'success' }
|
2016-08-11 13:22:35 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :failed do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'failed' }
|
2016-08-11 13:22:35 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :canceled do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'canceled' }
|
2016-08-11 13:22:35 +00:00
|
|
|
end
|
|
|
|
|
2016-11-18 17:02:49 +00:00
|
|
|
trait :skipped do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'skipped' }
|
2016-11-18 17:02:49 +00:00
|
|
|
end
|
|
|
|
|
2016-08-11 13:22:35 +00:00
|
|
|
trait :running do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'running' }
|
2016-08-11 13:22:35 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :pending do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'pending' }
|
2016-08-11 13:22:35 +00:00
|
|
|
end
|
|
|
|
|
2019-02-27 02:13:06 +00:00
|
|
|
trait :preparing do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'preparing' }
|
2019-02-27 02:13:06 +00:00
|
|
|
end
|
|
|
|
|
2016-08-11 13:22:35 +00:00
|
|
|
trait :created do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'created' }
|
2016-08-11 13:22:35 +00:00
|
|
|
end
|
|
|
|
|
2017-03-06 12:54:29 +00:00
|
|
|
trait :manual do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'manual' }
|
2017-03-06 12:54:29 +00:00
|
|
|
end
|
|
|
|
|
2018-09-26 11:21:36 +00:00
|
|
|
trait :scheduled do
|
2019-10-02 00:06:26 +00:00
|
|
|
status { 'scheduled' }
|
2018-09-26 11:21:36 +00:00
|
|
|
end
|
|
|
|
|
2016-01-26 07:32:36 +00:00
|
|
|
after(:build) do |build, evaluator|
|
2016-06-03 11:09:49 +00:00
|
|
|
build.project = build.pipeline.project
|
2016-01-26 07:32:36 +00:00
|
|
|
end
|
2015-10-06 10:01:16 +00:00
|
|
|
|
|
|
|
factory :generic_commit_status, class: GenericCommitStatus do
|
2019-10-02 00:06:26 +00:00
|
|
|
name { 'generic' }
|
|
|
|
description { 'external commit status' }
|
2015-10-06 10:01:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|