Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b76d5158
Commit
b76d5158
authored
Mar 01, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow custom ELASTIC_URL settings in tests
parent
20ed6c30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
spec/support/webmock.rb
spec/support/webmock.rb
+9
-4
No files found.
spec/support/webmock.rb
View file @
b76d5158
require
'webmock'
require
'webmock'
require
'webmock/rspec'
require
'webmock/rspec'
WebMock
.
disable_net_connect!
(
allowed
=
%w[elasticsearch registry.gitlab.com-gitlab-org-test-elastic-image]
allow_localhost:
true
,
allow:
[
'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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment