1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make sidekiq and resque integration tests work in CI

Since f55ecc6, the integration test of sidekiq and resque is not working
in CI.
https://travis-ci.org/rails/rails/jobs/251783876

Because f55ecc6 required a password to access redis.
Therefore, handling by passing passwords when connecting to redis.
This commit is contained in:
yuuji.yaginuma 2017-07-10 07:42:17 +09:00
parent 92be910f6a
commit 46725b33a9
2 changed files with 9 additions and 1 deletions

View file

@ -2,7 +2,7 @@
module ResqueJobsManager
def setup
ActiveJob::Base.queue_adapter = :resque
Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.connect(url: "redis://127.0.0.1:6379/12", thread_safe: true)
Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.connect(url: "redis://:password@127.0.0.1:6379/12", thread_safe: true)
Resque.logger = Rails.logger
unless can_run?
puts "Cannot run integration tests for resque. To be able to run integration tests for resque you need to install and start redis.\n"

View file

@ -4,6 +4,14 @@ require "sidekiq/api"
require "sidekiq/testing"
Sidekiq::Testing.disable!
Sidekiq.configure_server do |config|
config.redis = { url: "redis://:password@127.0.0.1:6379/12" }
end
Sidekiq.configure_client do |config|
config.redis = { url: "redis://:password@127.0.0.1:6379/12" }
end
module SidekiqJobsManager
def setup
ActiveJob::Base.queue_adapter = :sidekiq