2020-01-01 13:55:28 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
RSpec.shared_examples 'cluster cleanup worker base specs' do
|
2020-01-01 13:55:28 +05:30
|
|
|
it 'transitions to errored if sidekiq retries exhausted' do
|
|
|
|
job = { 'args' => [cluster.id, 0], 'jid' => '123' }
|
|
|
|
|
|
|
|
described_class.sidekiq_retries_exhausted_block.call(job)
|
|
|
|
|
|
|
|
expect(cluster.reload.cleanup_status_name).to eq(:cleanup_errored)
|
|
|
|
end
|
|
|
|
end
|