elasticsearch-transport 0.4.9 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
@@ -80,6 +80,7 @@ module Elasticsearch
|
|
80
80
|
arguments[:retry_on_failure] ||= false
|
81
81
|
arguments[:reload_on_failure] ||= false
|
82
82
|
arguments[:randomize_hosts] ||= false
|
83
|
+
arguments[:transport_options] ||= {}
|
83
84
|
|
84
85
|
@transport = arguments[:transport] || \
|
85
86
|
transport_class.new(:hosts => __extract_hosts(hosts, arguments), :options => arguments)
|
data/test/unit/client_test.rb
CHANGED
@@ -48,6 +48,14 @@ class Elasticsearch::Transport::ClientTest < Test::Unit::TestCase
|
|
48
48
|
assert_respond_to client.transport.tracer, :info
|
49
49
|
end
|
50
50
|
|
51
|
+
should "initialize the default transport class" do
|
52
|
+
Elasticsearch::Transport::Client::DEFAULT_TRANSPORT_CLASS.any_instance.
|
53
|
+
unstub(:__build_connections)
|
54
|
+
|
55
|
+
client = Elasticsearch::Client.new
|
56
|
+
assert_match /Faraday/, client.transport.connections.first.connection.headers['User-Agent']
|
57
|
+
end
|
58
|
+
|
51
59
|
context "when passed hosts" do
|
52
60
|
should "have localhost by default" do
|
53
61
|
c = Elasticsearch::Transport::Client.new
|