mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 18:13:39 +08:00
DEV: Add CAPYBARA_SERVER_HOST
(#23475)
Why this change? When running in a Docker container, we want to bind the Rails server started by Capybara to 0.0.0.0 instead of localhost. This is done via the `server_host` config for Capybara which can now be configured via the `CAPYBARA_SERVER_HOST` env.
This commit is contained in:
parent
ef73d20832
commit
6beed147cd
|
@ -308,7 +308,7 @@ RSpec.configure do |config|
|
||||||
Capybara.w3c_click_offset = false
|
Capybara.w3c_click_offset = false
|
||||||
|
|
||||||
Capybara.configure do |capybara_config|
|
Capybara.configure do |capybara_config|
|
||||||
capybara_config.server_host = "localhost"
|
capybara_config.server_host = ENV["CAPYBARA_SERVER_HOST"].presence || "localhost"
|
||||||
capybara_config.server_port = 31_337 + ENV["TEST_ENV_NUMBER"].to_i
|
capybara_config.server_port = 31_337 + ENV["TEST_ENV_NUMBER"].to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user