debian-mirror-gitlab/spec/factories/commit_statuses.rb

68 lines
1.3 KiB
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
FactoryBot.define do
2020-03-13 15:44:24 +05:30
factory :commit_status, class: 'CommitStatus' do
2019-12-21 20:55:43 +05:30
name { 'default' }
stage { 'test' }
stage_idx { 0 }
status { 'success' }
description { 'commit status'}
2019-12-26 22:10:19 +05:30
pipeline factory: :ci_pipeline
2019-12-21 20:55:43 +05:30
started_at { 'Tue, 26 Jan 2016 08:21:42 +0100'}
finished_at { 'Tue, 26 Jan 2016 08:23:42 +0100'}
2016-02-05 20:25:01 +05:30
2016-09-13 17:45:13 +05:30
trait :success do
2019-12-21 20:55:43 +05:30
status { 'success' }
2016-09-13 17:45:13 +05:30
end
trait :failed do
2019-12-21 20:55:43 +05:30
status { 'failed' }
2016-09-13 17:45:13 +05:30
end
trait :canceled do
2019-12-21 20:55:43 +05:30
status { 'canceled' }
2016-09-13 17:45:13 +05:30
end
2017-08-17 22:00:37 +05:30
trait :skipped do
2019-12-21 20:55:43 +05:30
status { 'skipped' }
2017-08-17 22:00:37 +05:30
end
2016-09-13 17:45:13 +05:30
trait :running do
2019-12-21 20:55:43 +05:30
status { 'running' }
2016-09-13 17:45:13 +05:30
end
trait :pending do
2019-12-21 20:55:43 +05:30
status { 'pending' }
2016-09-13 17:45:13 +05:30
end
2020-03-13 15:44:24 +05:30
trait :waiting_for_resource do
status { 'waiting_for_resource' }
end
2019-07-07 11:18:12 +05:30
trait :preparing do
2019-12-21 20:55:43 +05:30
status { 'preparing' }
2019-07-07 11:18:12 +05:30
end
2016-09-13 17:45:13 +05:30
trait :created do
2019-12-21 20:55:43 +05:30
status { 'created' }
2016-09-13 17:45:13 +05:30
end
2017-08-17 22:00:37 +05:30
trait :manual do
2019-12-21 20:55:43 +05:30
status { 'manual' }
2017-08-17 22:00:37 +05:30
end
2018-12-05 23:21:45 +05:30
trait :scheduled do
2019-12-21 20:55:43 +05:30
status { 'scheduled' }
2018-12-05 23:21:45 +05:30
end
2016-02-05 20:25:01 +05:30
after(:build) do |build, evaluator|
build.project = build.pipeline.project
2016-02-05 20:25:01 +05:30
end
2015-10-24 18:46:33 +05:30
2020-03-13 15:44:24 +05:30
factory :generic_commit_status, class: 'GenericCommitStatus' do
2019-12-21 20:55:43 +05:30
name { 'generic' }
description { 'external commit status' }
2015-10-24 18:46:33 +05:30
end
end
end