Skip to content

Commit

Permalink
Disable split during testing so that it doesn't try to talk to redis
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Sep 12, 2024
1 parent d572660 commit b2c8e99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# The value is kind of irrelevant actually
# TODO: Fix this
config.x.sidekiq_redis_url = "redis://localhost:6379/0"
config.x.split_redis_url = "redis://redis:6379/4"

## User settings (END)

Expand Down
3 changes: 3 additions & 0 deletions config/initializers/split.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
expire_seconds: 2592000)

Split.configure do |config|
# Just disable A/B testing during tests so that it doesn't try to talk to redis
config.enabled = false if Rails.env.test?

config.redis = Rails.configuration.x.split_redis_url

config.persistence = Split::Persistence::DualAdapter.with_config(
Expand Down

0 comments on commit b2c8e99

Please sign in to comment.