Commit 3ed3217b authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'tc-webpack-specs-fix' into 'master'

Make webmock allow requests to webpack too

See merge request gitlab-org/gitlab!19760
parents 34e5dfe4 886bbfed
...@@ -8,7 +8,11 @@ def webmock_allowed_hosts ...@@ -8,7 +8,11 @@ def webmock_allowed_hosts
if ENV.key?('ELASTIC_URL') if ENV.key?('ELASTIC_URL')
hosts << URI.parse(ENV['ELASTIC_URL']).host hosts << URI.parse(ENV['ELASTIC_URL']).host
end end
end.uniq
if Gitlab.config.webpack&.dev_server&.enabled
hosts << Gitlab.config.webpack.dev_server.host
end
end.compact.uniq
end end
WebMock.disable_net_connect!(allow_localhost: true, allow: webmock_allowed_hosts) WebMock.disable_net_connect!(allow_localhost: true, allow: webmock_allowed_hosts)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment