2019-07-25 01:11:48 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-02-16 22:55:24 -05:00
|
|
|
include ActionDispatch::TestProcess
|
|
|
|
|
2017-12-13 19:13:44 -05:00
|
|
|
FactoryBot.define do
|
2020-01-09 13:07:52 -05:00
|
|
|
factory :ci_build, class: 'Ci::Build' do
|
2019-10-01 20:06:26 -04:00
|
|
|
name { 'test' }
|
|
|
|
stage { 'test' }
|
|
|
|
stage_idx { 0 }
|
|
|
|
ref { 'master' }
|
|
|
|
tag { false }
|
|
|
|
add_attribute(:protected) { false }
|
|
|
|
created_at { 'Di 29. Okt 09:50:00 CET 2013' }
|
2020-02-12 01:09:05 -05:00
|
|
|
scheduling_type { 'stage' }
|
2017-12-21 10:49:15 -05:00
|
|
|
pending
|
2016-12-12 08:53:05 -05:00
|
|
|
|
2015-08-25 21:42:46 -04:00
|
|
|
options do
|
|
|
|
{
|
2020-03-25 08:08:19 -04:00
|
|
|
image: 'ruby:2.7',
|
2018-09-02 10:35:15 -04:00
|
|
|
services: ['postgres'],
|
|
|
|
script: ['ls -a']
|
2015-08-25 21:42:46 -04:00
|
|
|
}
|
|
|
|
end
|
2016-12-12 08:53:05 -05:00
|
|
|
|
2016-07-16 14:10:22 -04:00
|
|
|
yaml_variables do
|
|
|
|
[
|
2016-12-14 09:38:40 -05:00
|
|
|
{ key: 'DB_NAME', value: 'postgres', public: true }
|
2016-07-16 14:10:22 -04:00
|
|
|
]
|
|
|
|
end
|
2015-08-25 21:42:46 -04:00
|
|
|
|
2016-06-03 10:22:26 -04:00
|
|
|
pipeline factory: :ci_pipeline
|
2020-04-03 14:10:03 -04:00
|
|
|
project { pipeline.project }
|
2015-09-15 14:51:03 -04:00
|
|
|
|
2018-10-23 06:58:41 -04:00
|
|
|
trait :degenerated do
|
2019-10-01 20:06:26 -04:00
|
|
|
options { nil }
|
|
|
|
yaml_variables { nil }
|
2018-10-23 06:58:41 -04:00
|
|
|
end
|
|
|
|
|
2017-12-21 10:49:15 -05:00
|
|
|
trait :started do
|
2019-10-01 20:06:26 -04:00
|
|
|
started_at { 'Di 29. Okt 09:51:28 CET 2013' }
|
2017-12-21 10:49:15 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :finished do
|
|
|
|
started
|
2019-10-01 20:06:26 -04:00
|
|
|
finished_at { 'Di 29. Okt 09:53:28 CET 2013' }
|
2017-12-21 10:49:15 -05:00
|
|
|
end
|
|
|
|
|
2016-02-18 04:52:57 -05:00
|
|
|
trait :success do
|
2017-12-21 10:49:15 -05:00
|
|
|
finished
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'success' }
|
2016-02-18 04:52:57 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :failed do
|
2017-12-21 10:49:15 -05:00
|
|
|
finished
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'failed' }
|
2016-02-18 04:52:57 -05:00
|
|
|
end
|
|
|
|
|
2016-01-13 10:05:49 -05:00
|
|
|
trait :canceled do
|
2017-12-21 10:49:15 -05:00
|
|
|
finished
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'canceled' }
|
2016-01-13 10:05:49 -05:00
|
|
|
end
|
|
|
|
|
2016-11-18 12:02:49 -05:00
|
|
|
trait :skipped do
|
2017-12-21 10:49:15 -05:00
|
|
|
started
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'skipped' }
|
2016-11-18 12:02:49 -05:00
|
|
|
end
|
|
|
|
|
2016-02-18 05:47:35 -05:00
|
|
|
trait :running do
|
2017-12-21 10:49:15 -05:00
|
|
|
started
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'running' }
|
2016-02-18 05:47:35 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :pending do
|
2019-10-01 20:06:26 -04:00
|
|
|
queued_at { 'Di 29. Okt 09:50:59 CET 2013' }
|
|
|
|
status { 'pending' }
|
2016-02-18 05:47:35 -05:00
|
|
|
end
|
|
|
|
|
2016-08-11 09:22:35 -04:00
|
|
|
trait :created do
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'created' }
|
2016-08-11 09:22:35 -04:00
|
|
|
end
|
|
|
|
|
2019-12-24 07:08:01 -05:00
|
|
|
trait :waiting_for_resource do
|
|
|
|
status { 'waiting_for_resource' }
|
|
|
|
end
|
|
|
|
|
2019-02-26 21:13:06 -05:00
|
|
|
trait :preparing do
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'preparing' }
|
2019-02-26 21:13:06 -05:00
|
|
|
end
|
|
|
|
|
2018-09-26 06:12:48 -04:00
|
|
|
trait :scheduled do
|
|
|
|
schedulable
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'scheduled' }
|
2019-01-16 07:09:29 -05:00
|
|
|
scheduled_at { 1.minute.since }
|
2018-09-26 06:12:48 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :expired_scheduled do
|
|
|
|
schedulable
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'scheduled' }
|
2018-10-02 09:52:39 -04:00
|
|
|
scheduled_at { 1.minute.ago }
|
2018-09-26 06:12:48 -04:00
|
|
|
end
|
|
|
|
|
2016-07-16 19:48:51 -04:00
|
|
|
trait :manual do
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'manual' }
|
|
|
|
self.when { 'manual' }
|
2016-07-16 19:48:51 -04:00
|
|
|
end
|
|
|
|
|
2016-11-21 11:26:35 -05:00
|
|
|
trait :teardown_environment do
|
2019-10-01 20:06:26 -04:00
|
|
|
environment { 'staging' }
|
2018-09-02 10:35:15 -04:00
|
|
|
options do
|
|
|
|
{
|
|
|
|
script: %w(ls),
|
|
|
|
environment: { name: 'staging',
|
2019-10-01 20:06:26 -04:00
|
|
|
action: 'stop',
|
|
|
|
url: 'http://staging.example.com/$CI_JOB_NAME' }
|
2018-09-02 10:35:15 -04:00
|
|
|
}
|
|
|
|
end
|
2018-11-04 19:37:40 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :deploy_to_production do
|
2019-10-01 20:06:26 -04:00
|
|
|
environment { 'production' }
|
2018-11-04 19:37:40 -05:00
|
|
|
|
2018-09-02 10:35:15 -04:00
|
|
|
options do
|
|
|
|
{
|
|
|
|
script: %w(ls),
|
|
|
|
environment: { name: 'production',
|
2019-10-01 20:06:26 -04:00
|
|
|
url: 'http://prd.example.com/$CI_JOB_NAME' }
|
2018-09-02 10:35:15 -04:00
|
|
|
}
|
|
|
|
end
|
2018-11-04 19:37:40 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :start_review_app do
|
2019-10-01 20:06:26 -04:00
|
|
|
environment { 'review/$CI_COMMIT_REF_NAME' }
|
2018-11-04 19:37:40 -05:00
|
|
|
|
2018-09-02 10:35:15 -04:00
|
|
|
options do
|
|
|
|
{
|
|
|
|
script: %w(ls),
|
|
|
|
environment: { name: 'review/$CI_COMMIT_REF_NAME',
|
2019-10-01 20:06:26 -04:00
|
|
|
url: 'http://staging.example.com/$CI_JOB_NAME',
|
|
|
|
on_stop: 'stop_review_app' }
|
2018-09-02 10:35:15 -04:00
|
|
|
}
|
|
|
|
end
|
2018-11-04 19:37:40 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :stop_review_app do
|
2019-10-01 20:06:26 -04:00
|
|
|
name { 'stop_review_app' }
|
|
|
|
environment { 'review/$CI_COMMIT_REF_NAME' }
|
2018-11-04 19:37:40 -05:00
|
|
|
|
2018-09-02 10:35:15 -04:00
|
|
|
options do
|
|
|
|
{
|
|
|
|
script: %w(ls),
|
|
|
|
environment: { name: 'review/$CI_COMMIT_REF_NAME',
|
2019-10-01 20:06:26 -04:00
|
|
|
url: 'http://staging.example.com/$CI_JOB_NAME',
|
|
|
|
action: 'stop' }
|
2018-09-02 10:35:15 -04:00
|
|
|
}
|
|
|
|
end
|
2016-11-21 11:26:35 -05:00
|
|
|
end
|
|
|
|
|
2016-02-18 05:47:35 -05:00
|
|
|
trait :allowed_to_fail do
|
2019-10-01 20:06:26 -04:00
|
|
|
allow_failure { true }
|
2016-02-18 05:47:35 -05:00
|
|
|
end
|
|
|
|
|
2017-03-02 07:45:01 -05:00
|
|
|
trait :ignored do
|
|
|
|
allowed_to_fail
|
|
|
|
end
|
|
|
|
|
2016-12-12 08:53:05 -05:00
|
|
|
trait :playable do
|
|
|
|
manual
|
|
|
|
end
|
|
|
|
|
2017-04-28 05:38:32 -04:00
|
|
|
trait :retryable do
|
|
|
|
success
|
|
|
|
end
|
|
|
|
|
2018-09-26 02:13:39 -04:00
|
|
|
trait :schedulable do
|
2019-10-01 20:06:26 -04:00
|
|
|
self.when { 'delayed' }
|
2018-09-02 10:35:15 -04:00
|
|
|
|
|
|
|
options do
|
|
|
|
{
|
|
|
|
script: ['ls -a'],
|
|
|
|
start_in: '1 minute'
|
|
|
|
}
|
|
|
|
end
|
2018-09-26 02:13:39 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :actionable do
|
2019-10-01 20:06:26 -04:00
|
|
|
self.when { 'manual' }
|
2018-09-26 02:13:39 -04:00
|
|
|
end
|
|
|
|
|
2017-07-17 06:38:21 -04:00
|
|
|
trait :retried do
|
2019-10-01 20:06:26 -04:00
|
|
|
retried { true }
|
2017-07-17 06:38:21 -04:00
|
|
|
end
|
|
|
|
|
2017-04-28 05:38:32 -04:00
|
|
|
trait :cancelable do
|
|
|
|
pending
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :erasable do
|
|
|
|
success
|
|
|
|
artifacts
|
|
|
|
end
|
|
|
|
|
2017-03-01 05:39:36 -05:00
|
|
|
trait :tags do
|
2019-10-01 20:06:26 -04:00
|
|
|
tag_list do
|
|
|
|
[:docker, :ruby]
|
|
|
|
end
|
2017-03-01 05:39:36 -05:00
|
|
|
end
|
|
|
|
|
2017-03-01 05:57:06 -05:00
|
|
|
trait :on_tag do
|
2019-10-01 20:06:26 -04:00
|
|
|
tag { true }
|
2017-03-01 05:57:06 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :triggered do
|
2017-09-01 13:37:11 -04:00
|
|
|
trigger_request factory: :ci_trigger_request
|
2017-03-01 05:57:06 -05:00
|
|
|
end
|
|
|
|
|
2019-12-19 10:07:55 -05:00
|
|
|
trait :resource_group do
|
|
|
|
waiting_for_resource_at { 5.minutes.ago }
|
|
|
|
|
|
|
|
after(:build) do |build, evaluator|
|
|
|
|
build.resource_group = create(:ci_resource_group, project: build.project)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-10-15 08:06:06 -04:00
|
|
|
trait :with_deployment do
|
|
|
|
after(:build) do |build, evaluator|
|
|
|
|
##
|
|
|
|
# Build deployment/environment relations if environment name is set
|
|
|
|
# to the job. If `build.deployment` has already been set, it doesn't
|
|
|
|
# build a new instance.
|
2020-03-03 19:07:52 -05:00
|
|
|
environment = Gitlab::Ci::Pipeline::Seed::Environment.new(build).to_resource
|
2019-10-15 08:06:06 -04:00
|
|
|
build.deployment =
|
2020-03-03 19:07:52 -05:00
|
|
|
Gitlab::Ci::Pipeline::Seed::Deployment.new(build, environment).to_resource
|
2019-10-15 08:06:06 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-10-30 05:25:28 -04:00
|
|
|
trait :tag do
|
2019-10-01 20:06:26 -04:00
|
|
|
tag { true }
|
2015-10-05 04:14:33 -04:00
|
|
|
end
|
2015-12-30 09:12:07 -05:00
|
|
|
|
2017-02-16 07:13:10 -05:00
|
|
|
trait :coverage do
|
2019-10-01 20:06:26 -04:00
|
|
|
coverage { 99.9 }
|
|
|
|
coverage_regex { '/(d+)/' }
|
2016-02-04 05:08:58 -05:00
|
|
|
end
|
|
|
|
|
2018-02-05 04:07:37 -05:00
|
|
|
trait :trace_live do
|
2016-02-01 05:29:41 -05:00
|
|
|
after(:create) do |build, evaluator|
|
2017-04-06 12:20:27 -04:00
|
|
|
build.trace.set('BUILD TRACE')
|
2016-01-11 10:30:01 -05:00
|
|
|
end
|
2015-12-30 09:12:07 -05:00
|
|
|
end
|
2016-02-02 09:51:48 -05:00
|
|
|
|
2018-01-31 07:56:04 -05:00
|
|
|
trait :trace_artifact do
|
|
|
|
after(:create) do |build, evaluator|
|
|
|
|
create(:ci_job_artifact, :trace, job: build)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-06-17 10:22:40 -04:00
|
|
|
trait :trace_with_duplicate_sections do
|
2019-06-13 07:23:18 -04:00
|
|
|
after(:create) do |build, evaluator|
|
|
|
|
trace = File.binread(
|
|
|
|
File.expand_path(
|
2019-06-17 10:22:40 -04:00
|
|
|
Rails.root.join('spec/fixtures/trace/trace_with_duplicate_sections')))
|
2019-06-13 07:23:18 -04:00
|
|
|
|
|
|
|
build.trace.set(trace)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-06-17 11:14:02 -04:00
|
|
|
trait :trace_with_sections do
|
|
|
|
after(:create) do |build, evaluator|
|
|
|
|
trace = File.binread(
|
|
|
|
File.expand_path(
|
|
|
|
Rails.root.join('spec/fixtures/trace/trace_with_sections')))
|
|
|
|
|
|
|
|
build.trace.set(trace)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-02-05 04:07:37 -05:00
|
|
|
trait :unicode_trace_live do
|
2017-04-17 07:59:55 -04:00
|
|
|
after(:create) do |build, evaluator|
|
|
|
|
trace = File.binread(
|
|
|
|
File.expand_path(
|
|
|
|
Rails.root.join('spec/fixtures/trace/ansi-sequence-and-unicode')))
|
|
|
|
|
|
|
|
build.trace.set(trace)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-02-16 07:13:10 -05:00
|
|
|
trait :erased do
|
2018-09-20 13:02:36 -04:00
|
|
|
erased_at { Time.now }
|
2017-02-16 07:13:10 -05:00
|
|
|
erased_by factory: :user
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :queued do
|
2018-09-20 13:02:36 -04:00
|
|
|
queued_at { Time.now }
|
2017-02-16 07:13:10 -05:00
|
|
|
runner factory: :ci_runner
|
|
|
|
end
|
|
|
|
|
2016-02-02 09:51:48 -05:00
|
|
|
trait :artifacts do
|
2017-11-02 07:16:50 -04:00
|
|
|
after(:create) do |build|
|
2018-01-19 07:44:27 -05:00
|
|
|
create(:ci_job_artifact, :archive, job: build, expire_at: build.artifacts_expire_at)
|
|
|
|
create(:ci_job_artifact, :metadata, job: build, expire_at: build.artifacts_expire_at)
|
2017-11-02 14:38:25 -04:00
|
|
|
build.reload
|
2017-11-02 07:16:50 -04:00
|
|
|
end
|
2016-02-02 09:51:48 -05:00
|
|
|
end
|
2016-07-28 01:09:40 -04:00
|
|
|
|
2018-07-27 01:04:35 -04:00
|
|
|
trait :test_reports do
|
2018-08-03 07:08:13 -04:00
|
|
|
after(:build) do |build|
|
|
|
|
build.job_artifacts << create(:ci_job_artifact, :junit, job: build)
|
2018-07-27 01:04:35 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-04-03 02:09:14 -04:00
|
|
|
trait :test_reports_with_attachment do
|
|
|
|
after(:build) do |build|
|
|
|
|
build.job_artifacts << create(:ci_job_artifact, :junit_with_attachment, job: build)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-04-21 11:21:10 -04:00
|
|
|
trait :broken_test_reports do
|
|
|
|
after(:build) do |build|
|
|
|
|
build.job_artifacts << create(:ci_job_artifact, :junit_with_corrupted_data, job: build)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-03-17 14:09:44 -04:00
|
|
|
trait :coverage_reports do
|
|
|
|
after(:build) do |build|
|
|
|
|
build.job_artifacts << create(:ci_job_artifact, :cobertura, job: build)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-04-21 11:21:10 -04:00
|
|
|
trait :terraform_reports do
|
|
|
|
after(:build) do |build|
|
|
|
|
build.job_artifacts << create(:ci_job_artifact, :terraform, job: build)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-19 03:14:06 -04:00
|
|
|
trait :expired do
|
2018-09-20 13:02:36 -04:00
|
|
|
artifacts_expire_at { 1.minute.ago }
|
2016-07-28 01:09:40 -04:00
|
|
|
end
|
2017-01-18 05:38:59 -05:00
|
|
|
|
|
|
|
trait :with_commit do
|
|
|
|
after(:build) do |build|
|
|
|
|
allow(build).to receive(:commit).and_return build(:commit, :without_author)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :with_commit_and_author do
|
|
|
|
after(:build) do |build|
|
|
|
|
allow(build).to receive(:commit).and_return build(:commit)
|
|
|
|
end
|
|
|
|
end
|
2017-02-15 19:05:44 -05:00
|
|
|
|
|
|
|
trait :extended_options do
|
|
|
|
options do
|
|
|
|
{
|
2020-03-25 08:08:19 -04:00
|
|
|
image: { name: 'ruby:2.7', entrypoint: '/bin/sh' },
|
2019-10-01 20:06:26 -04:00
|
|
|
services: ['postgres', { name: 'docker:stable-dind', entrypoint: '/bin/sh', command: 'sleep 30', alias: 'docker' }],
|
|
|
|
script: %w(echo),
|
|
|
|
after_script: %w(ls date),
|
|
|
|
artifacts: {
|
|
|
|
name: 'artifacts_file',
|
|
|
|
untracked: false,
|
|
|
|
paths: ['out/'],
|
|
|
|
when: 'always',
|
|
|
|
expire_in: '7d'
|
|
|
|
},
|
|
|
|
cache: {
|
|
|
|
key: 'cache_key',
|
|
|
|
untracked: false,
|
|
|
|
paths: ['vendor/*'],
|
|
|
|
policy: 'pull-push'
|
|
|
|
}
|
2017-02-15 19:05:44 -05:00
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2017-03-02 11:44:15 -05:00
|
|
|
|
|
|
|
trait :no_options do
|
|
|
|
options { {} }
|
|
|
|
end
|
2017-04-04 04:14:46 -04:00
|
|
|
|
2020-03-17 14:09:44 -04:00
|
|
|
# TODO: move Security traits to ee_ci_build
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/issues/210486
|
2019-10-11 11:06:41 -04:00
|
|
|
trait :dast do
|
|
|
|
options do
|
|
|
|
{
|
|
|
|
artifacts: { reports: { dast: 'gl-dast-report.json' } }
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :sast do
|
|
|
|
options do
|
|
|
|
{
|
|
|
|
artifacts: { reports: { sast: 'gl-sast-report.json' } }
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :dependency_scanning do
|
|
|
|
options do
|
|
|
|
{
|
|
|
|
artifacts: { reports: { dependency_scanning: 'gl-dependency-scanning-report.json' } }
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :container_scanning do
|
|
|
|
options do
|
|
|
|
{
|
|
|
|
artifacts: { reports: { container_scanning: 'gl-container-scanning-report.json' } }
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-11-26 10:06:50 -05:00
|
|
|
trait :license_management do
|
|
|
|
options do
|
|
|
|
{
|
|
|
|
artifacts: { reports: { license_management: 'gl-license-management-report.json' } }
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-03-17 14:09:44 -04:00
|
|
|
trait :license_scanning do
|
|
|
|
options do
|
|
|
|
{
|
|
|
|
artifacts: { reports: { license_management: 'gl-license-scanning-report.json' } }
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-04-04 04:14:46 -04:00
|
|
|
trait :non_playable do
|
2019-10-01 20:06:26 -04:00
|
|
|
status { 'created' }
|
|
|
|
self.when { 'manual' }
|
2017-04-04 04:14:46 -04:00
|
|
|
end
|
2017-08-22 04:01:11 -04:00
|
|
|
|
2017-08-31 08:13:40 -04:00
|
|
|
trait :protected do
|
2019-10-01 20:06:26 -04:00
|
|
|
add_attribute(:protected) { true }
|
2017-08-22 04:01:11 -04:00
|
|
|
end
|
2018-04-05 17:04:42 -04:00
|
|
|
|
|
|
|
trait :script_failure do
|
|
|
|
failed
|
2019-10-01 20:06:26 -04:00
|
|
|
failure_reason { 1 }
|
2018-04-05 17:04:42 -04:00
|
|
|
end
|
2018-04-19 03:20:53 -04:00
|
|
|
|
|
|
|
trait :api_failure do
|
|
|
|
failed
|
2019-10-01 20:06:26 -04:00
|
|
|
failure_reason { 2 }
|
2018-04-19 03:20:53 -04:00
|
|
|
end
|
2018-07-05 09:55:10 -04:00
|
|
|
|
2019-03-26 02:09:07 -04:00
|
|
|
trait :prerequisite_failure do
|
|
|
|
failed
|
2019-10-01 20:06:26 -04:00
|
|
|
failure_reason { 10 }
|
2019-03-26 02:09:07 -04:00
|
|
|
end
|
|
|
|
|
2018-07-05 09:55:10 -04:00
|
|
|
trait :with_runner_session do
|
|
|
|
after(:build) do |build|
|
2018-11-28 13:37:12 -05:00
|
|
|
build.build_runner_session(url: 'https://localhost')
|
2018-07-05 09:55:10 -04:00
|
|
|
end
|
|
|
|
end
|
2015-08-25 21:42:46 -04:00
|
|
|
end
|
|
|
|
end
|