Different configurations for features test and rspec

陌路散爱 提交于 2019-12-11 04:12:35

问题


I'm facing a strange issue after updated rails from 4.2 to 5.2. My features test needs following configuration to run

config.redis_config = {
  driver: :hiredis,
  host: ENV['REDIS_HOST'] || 'redis',
  port: ENV['REDIS_PORT'] || 6379
}

with above config I get error unknow service for model tests which need following configuration

config.redis_config = {
  host: ENV['REDIS_HOST'] || 'redis',
  port: ENV['REDIS_PORT'] || 6379
}

or

config.redis_config = {
  host: ENV['REDIS_HOST'] || 'localhost',
  port: ENV['REDIS_PORT'] || 6379
}

By these configuration I get error of timeout for features test. Isn't strange? Some contents from gemfile.lock

hiredis (0.6.3)
redis (3.3.5)
rails (~> 5.2.1)
capybara (3.11.1)
selenium-webdriver (3.141.0)

来源:https://stackoverflow.com/questions/53502225/different-configurations-for-features-test-and-rspec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!