Welcome to mirror list, hosted at ThFree Co, Russian Federation.

webmock.rb « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9ac7e7fc51595de7becffc833681641c873a9dfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require 'webmock'
require 'webmock/rspec'

def webmock_allowed_hosts
  %w[elasticsearch registry.gitlab.com-gitlab-org-test-elastic-image].tap do |hosts|
    if ENV.key?('ELASTIC_URL')
      hosts << URI.parse(ENV['ELASTIC_URL']).host
    end
  end.uniq
end

WebMock.disable_net_connect!(allow_localhost: true, allow: webmock_allowed_hosts)