diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2017-05-07 22:35:56 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2017-05-07 22:35:56 +0000 |
commit | 8df3997a92bffa2d29f3c559933a336b837cdb93 (patch) | |
tree | 5ee50876b35b6c5fd40607665f72468cfcee51fe /spec/factories | |
parent | 8a0cde81feb3c8f3af26eefa5cef7b72eda2d266 (diff) | |
download | gitlab-ce-8df3997a92bffa2d29f3c559933a336b837cdb93.tar.gz |
Add Pipeline Schedules that supersedes experimental Trigger Schedule
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/ci/pipeline_schedule.rb (renamed from spec/factories/ci/trigger_schedules.rb) | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/factories/ci/trigger_schedules.rb b/spec/factories/ci/pipeline_schedule.rb index 2390706fa41..a716da46ac6 100644 --- a/spec/factories/ci/trigger_schedules.rb +++ b/spec/factories/ci/pipeline_schedule.rb @@ -1,14 +1,11 @@ FactoryGirl.define do - factory :ci_trigger_schedule, class: Ci::TriggerSchedule do - trigger factory: :ci_trigger_for_trigger_schedule + factory :ci_pipeline_schedule, class: Ci::PipelineSchedule do cron '0 1 * * *' cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE ref 'master' active true - - after(:build) do |trigger_schedule, evaluator| - trigger_schedule.project ||= trigger_schedule.trigger.project - end + description "pipeline schedule" + project factory: :empty_project trait :nightly do cron '0 1 * * *' @@ -24,5 +21,9 @@ FactoryGirl.define do cron '0 1 22 * *' cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE end + + trait :inactive do + active false + end end end |