Maintenance: Ensure that FQDN Setting has correct host and port value in Capybara system test context.
This commit is contained in:
parent
c35c00fa57
commit
e6379bc2ab
1 changed files with 9 additions and 2 deletions
|
@ -3,8 +3,15 @@ require_relative './set_up'
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
config.before(:each, type: :system) do
|
config.before(:each, type: :system) do
|
||||||
|
|
||||||
# start a silenced Puma as application server
|
Capybara.register_server :puma_wrapper do |app, port, host, **_options|
|
||||||
Capybara.server = :puma, { Silent: true, Host: '0.0.0.0', Threads: '0:16' }
|
|
||||||
|
# update fqdn Setting according to random assigned Rack server port
|
||||||
|
Setting.set('fqdn', "#{host}:#{port}")
|
||||||
|
|
||||||
|
# start a silenced Puma as application server
|
||||||
|
Capybara.servers[:puma].call(app, port, host, { Silent: true, Host: '0.0.0.0', Threads: '0:16' })
|
||||||
|
end
|
||||||
|
Capybara.server = :puma_wrapper
|
||||||
|
|
||||||
# set the Host from gather container IP for CI runs
|
# set the Host from gather container IP for CI runs
|
||||||
if ENV['CI'].present?
|
if ENV['CI'].present?
|
||||||
|
|
Loading…
Reference in a new issue