Commit 4a5c6a8e authored by Shinya Maeda's avatar Shinya Maeda

Rename cron_nightly_build to nightly

parent 0c153af7
...@@ -14,17 +14,17 @@ FactoryGirl.define do ...@@ -14,17 +14,17 @@ FactoryGirl.define do
end end
end end
trait :cron_nightly_build do trait :nightly do
cron '0 1 * * *' cron '0 1 * * *'
cron_time_zone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE cron_time_zone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
end end
trait :cron_weekly_build do trait :weekly do
cron '0 1 * * 6' cron '0 1 * * 6'
cron_time_zone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE cron_time_zone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
end end
trait :cron_monthly_build do trait :monthly do
cron '0 1 22 * *' cron '0 1 22 * *'
cron_time_zone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE cron_time_zone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE
end end
......
...@@ -6,7 +6,7 @@ describe Ci::TriggerSchedule, models: true do ...@@ -6,7 +6,7 @@ describe Ci::TriggerSchedule, models: true do
it { is_expected.to respond_to :ref } it { is_expected.to respond_to :ref }
describe '#schedule_next_run!' do describe '#schedule_next_run!' do
let(:trigger_schedule) { create(:ci_trigger_schedule, :cron_nightly_build, next_run_at: nil) } let(:trigger_schedule) { create(:ci_trigger_schedule, :nightly, next_run_at: nil) }
before do before do
trigger_schedule.schedule_next_run! trigger_schedule.schedule_next_run!
......
...@@ -8,7 +8,7 @@ describe TriggerScheduleWorker do ...@@ -8,7 +8,7 @@ describe TriggerScheduleWorker do
end end
context 'when there is a scheduled trigger within next_run_at' do context 'when there is a scheduled trigger within next_run_at' do
let!(:trigger_schedule) { create(:ci_trigger_schedule, :cron_nightly_build, :force_triggable) } let!(:trigger_schedule) { create(:ci_trigger_schedule, :nightly, :force_triggable) }
before do before do
worker.perform worker.perform
...@@ -29,7 +29,7 @@ describe TriggerScheduleWorker do ...@@ -29,7 +29,7 @@ describe TriggerScheduleWorker do
end end
context 'when there are no scheduled triggers within next_run_at' do context 'when there are no scheduled triggers within next_run_at' do
let!(:trigger_schedule) { create(:ci_trigger_schedule, :cron_nightly_build) } let!(:trigger_schedule) { create(:ci_trigger_schedule, :nightly) }
before do before do
worker.perform worker.perform
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment