Skip to content

Commit 2ef8744

Browse files
committed
[MODEL] [TEST] Removed hardcoded port 9250 and used ENV['TEST_CLUSTER_PORT'] in test cluster initialization
1 parent eba62e9 commit 2ef8744

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch-model/test/test_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def setup
4949
tracer = ::Logger.new(STDERR)
5050
tracer.formatter = lambda { |s, d, p, m| "#{m.gsub(/^.*$/) { |n| ' ' + n }.ansi(:faint)}\n" }
5151

52-
Elasticsearch::Model.client = Elasticsearch::Client.new host: 'localhost:9250',
52+
Elasticsearch::Model.client = Elasticsearch::Client.new host: "localhost:#{(ENV['TEST_CLUSTER_PORT'] || 9250)}",
5353
tracer: (ENV['QUIET'] ? nil : tracer)
5454
end
5555
end

0 commit comments

Comments
 (0)