Commit 3ea4a139 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Yet, another errors

parent 0872b854
...@@ -13,6 +13,6 @@ class AddIndexToNextRunAtAndActive < ActiveRecord::Migration ...@@ -13,6 +13,6 @@ class AddIndexToNextRunAtAndActive < ActiveRecord::Migration
end end
def down def down
remove_index :ci_trigger_schedules, [:active, :next_run_at] remove_concurrent_index :ci_trigger_schedules, [:active, :next_run_at]
end end
end end
...@@ -57,7 +57,10 @@ describe TriggerScheduleWorker do ...@@ -57,7 +57,10 @@ describe TriggerScheduleWorker do
end end
context 'when next_run_at is nil' do 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 it 'does not create a new pipeline' do
expect { worker.perform }.not_to change { Ci::Pipeline.count } expect { worker.perform }.not_to change { Ci::Pipeline.count }
......
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