mirror of
https://github.com/mastodon/mastodon.git
synced 2025-12-11 12:12:46 +00:00
Fix RSpec/LeakyLocalVariable cop
This commit is contained in:
parent
05b33bafb8
commit
dfc07f62dc
|
|
@ -73,8 +73,6 @@ RSpec.describe Mastodon::RedisConfiguration do
|
|||
end
|
||||
|
||||
shared_examples 'sentinel support' do |prefix = nil|
|
||||
prefix = prefix ? "#{prefix}_" : ''
|
||||
|
||||
context 'when configuring sentinel support' do
|
||||
around do |example|
|
||||
ClimateControl.modify "#{prefix}REDIS_PASSWORD": 'testpass1', "#{prefix}REDIS_HOST": 'redis2.example.com', "#{prefix}REDIS_SENTINELS": '192.168.0.1:3000,192.168.0.2:4000', "#{prefix}REDIS_SENTINEL_MASTER": 'mainsentinel' do
|
||||
|
|
@ -199,7 +197,7 @@ RSpec.describe Mastodon::RedisConfiguration do
|
|||
|
||||
it_behaves_like 'secondary configuration', 'SIDEKIQ'
|
||||
it_behaves_like 'setting a different driver'
|
||||
it_behaves_like 'sentinel support', 'SIDEKIQ'
|
||||
it_behaves_like 'sentinel support', 'SIDEKIQ_'
|
||||
end
|
||||
|
||||
describe '#cache' do
|
||||
|
|
@ -225,6 +223,6 @@ RSpec.describe Mastodon::RedisConfiguration do
|
|||
|
||||
it_behaves_like 'secondary configuration', 'CACHE'
|
||||
it_behaves_like 'setting a different driver'
|
||||
it_behaves_like 'sentinel support', 'CACHE'
|
||||
it_behaves_like 'sentinel support', 'CACHE_'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user