提交 46725b33 编写于 作者: Y yuuji.yaginuma

Make sidekiq and resque integration tests work in CI

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

Because f55ecc6a required a password to access redis.
Therefore, handling by passing passwords when connecting to redis.
上级 92be910f
......@@ -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"
......
......@@ -4,6 +4,14 @@
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册