Open
Description
I have DatabaseCleaner configured with multiple Redis databases, something like the following:.
DatabaseCleaner[:redis, db: Redis.new(url: "rediss://localhost:6379/1", ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })].strategy = :deletion
DatabaseCleaner[:redis, db: Redis.new(url: "rediss://localhost:6379/2", ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })].strategy = :deletion
DatabaseCleaner[:redis, db: Redis.new(url: "rediss://localhost:6379/3", ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })].strategy = :deletion
DatabaseCleaner[:redis, db: Redis.new(url: "rediss://localhost:6379/4", ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })].strategy = :deletion
The problem is that it still cleans the default Redis database despite me configuring it.
As a workaround, doing the following seems to remove this behavior:
DatabaseCleaner[:redis].strategy = nil
But I think it doesn't make sense to do this if any other Redis cleaner is configured. Or at least this behavior should be documented if intentional.
Metadata
Metadata
Assignees
Labels
No labels