Skip to content

Commit

Permalink
Allow custom Redis instance for tests
Browse files Browse the repository at this point in the history
You probably don't want the tests to use the same Redis you use for any
app development.

Maybe you want to use Docker with custom port:

    docker run --rm -it -p 16379:6379 redis:6
  • Loading branch information
dentarg committed Feb 17, 2024
1 parent 1d80548 commit 325c644
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sentry-resque/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
require "resque"
require "resque-retry"

# Allow customization of the Redis instance used for tests
Resque.redis = ENV["REDIS_URL"] if ENV.key?("REDIS_URL")

# To workaround https://github.com/steveklabnik/mono_logger/issues/13
# Note: mono_logger is resque's default logger
Resque.logger = ::Logger.new(nil)
Expand Down

0 comments on commit 325c644

Please sign in to comment.