Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-13 18:10:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-13 18:10:20 +0300
commite958867b2e341329243be8db0c262233ae1238c0 (patch)
treec5d57d56735b4cf750f14a49ca576920b0458a85 /spec/models/ci/pipeline_schedule_spec.rb
parent3748ae5cbbefd3de0111951e71e74b676c276d61 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/ci/pipeline_schedule_spec.rb')
-rw-r--r--spec/models/ci/pipeline_schedule_spec.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/spec/models/ci/pipeline_schedule_spec.rb b/spec/models/ci/pipeline_schedule_spec.rb
index 028208a56f1..d5560edbbfd 100644
--- a/spec/models/ci/pipeline_schedule_spec.rb
+++ b/spec/models/ci/pipeline_schedule_spec.rb
@@ -126,16 +126,6 @@ RSpec.describe Ci::PipelineSchedule do
end
end
- context 'when pipeline schedule runs every minute' do
- let(:pipeline_schedule) { create(:ci_pipeline_schedule, :every_minute) }
-
- it "updates next_run_at to the sidekiq worker's execution time" do
- travel_to(Time.zone.parse("2019-06-01 12:18:00+0000")) do
- expect(pipeline_schedule.next_run_at).to eq(cron_worker_next_run_at)
- end
- end
- end
-
context 'when there are two different pipeline schedules in different time zones' do
let(:pipeline_schedule_1) { create(:ci_pipeline_schedule, :weekly, cron_timezone: 'Eastern Time (US & Canada)') }
let(:pipeline_schedule_2) { create(:ci_pipeline_schedule, :weekly, cron_timezone: 'UTC') }
@@ -144,24 +134,6 @@ RSpec.describe Ci::PipelineSchedule do
expect(pipeline_schedule_1.next_run_at).not_to eq(pipeline_schedule_2.next_run_at)
end
end
-
- context 'when there are two different pipeline schedules in the same time zones' do
- let(:pipeline_schedule_1) { create(:ci_pipeline_schedule, :weekly, cron_timezone: 'UTC') }
- let(:pipeline_schedule_2) { create(:ci_pipeline_schedule, :weekly, cron_timezone: 'UTC') }
-
- it 'sets the sames next_run_at' do
- expect(pipeline_schedule_1.next_run_at).to eq(pipeline_schedule_2.next_run_at)
- end
- end
-
- context 'when updates cron of exsisted pipeline schedule' do
- let(:new_cron) { '0 0 1 1 *' }
-
- it 'updates next_run_at automatically' do
- expect { pipeline_schedule.update!(cron: new_cron) }
- .to change { pipeline_schedule.next_run_at }
- end
- end
end
describe '#schedule_next_run!' do