Acceptance tests already cover integration with RedisCacheStore and MemCacheStore

This commit is contained in:
Gonzalo Rodriguez 2018-06-22 14:51:38 -03:00
parent 5aedc05121
commit 3f590e4774
No known key found for this signature in database
GPG key ID: 5DB8B81B049B8AB1

View file

@ -16,23 +16,18 @@ describe Rack::Attack::Cache do
end
require 'active_support/cache/dalli_store'
require 'active_support/cache/mem_cache_store'
require 'active_support/cache/redis_store'
require 'active_support/cache/redis_cache_store' if ActiveSupport.version.to_s.to_f >= 5.2
require 'connection_pool'
cache_stores = [
ActiveSupport::Cache::MemoryStore.new,
ActiveSupport::Cache::DalliStore.new("127.0.0.1"),
ActiveSupport::Cache::RedisStore.new("127.0.0.1"),
ActiveSupport::Cache::MemCacheStore.new("127.0.0.1"),
Dalli::Client.new,
ConnectionPool.new { Dalli::Client.new },
Redis::Store.new
]
cache_stores << ActiveSupport::Cache::RedisCacheStore.new if defined?(ActiveSupport::Cache::RedisCacheStore)
cache_stores.each do |store|
store = Rack::Attack::StoreProxy.build(store)