Commit b76d5158 authored by Nick Thomas's avatar Nick Thomas

Allow custom ELASTIC_URL settings in tests

parent 20ed6c30
require 'webmock'
require 'webmock/rspec'
WebMock.disable_net_connect!(
allow_localhost: true,
allow: ['elasticsearch', 'registry.gitlab.com-gitlab-org-test-elastic-image']
)
allowed = %w[elasticsearch registry.gitlab.com-gitlab-org-test-elastic-image]
if ENV.has_key?('ELASTIC_URL')
url = URI.parse(ENV['ELASTIC_URL'])
allowed << url.host
allowed.uniq!
end
WebMock.disable_net_connect!(allow_localhost: true, allow: allowed)
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