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:
-rw-r--r--db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb2
-rw-r--r--spec/workers/trigger_schedule_worker_spec.rb5
2 files changed, 5 insertions, 2 deletions
diff --git a/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb
index e1382318d3c..626c2a67fdc 100644
--- a/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb
+++ b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb
@@ -13,6 +13,6 @@ class AddIndexToNextRunAtAndActive < ActiveRecord::Migration
end
def down
- remove_index :ci_trigger_schedules, [:active, :next_run_at]
+ remove_concurrent_index :ci_trigger_schedules, [:active, :next_run_at]
end
end
diff --git a/spec/workers/trigger_schedule_worker_spec.rb b/spec/workers/trigger_schedule_worker_spec.rb
index fdc638d9070..b34ef3175bf 100644
--- a/spec/workers/trigger_schedule_worker_spec.rb
+++ b/spec/workers/trigger_schedule_worker_spec.rb
@@ -57,7 +57,10 @@ describe TriggerScheduleWorker do
end
context 'when next_run_at is nil' do
- let!(:trigger_schedule) { create(:ci_trigger_schedule, :nightly, next_run_at: nil) }
+ before
+ schedule = create(:ci_trigger_schedule, :nightly)
+ schedule.update_column(:next_run_at, nil)
+ end
it 'does not create a new pipeline' do
expect { worker.perform }.not_to change { Ci::Pipeline.count }