|
3 | 3 | describe "outputs/elasticsearch_java" do |
4 | 4 | context "registration" do |
5 | 5 | it "should register" do |
6 | | - output = LogStash::Plugin.lookup("output", "elasticsearch_java").new("protocol" => "transport", "manage_template" => "false") |
| 6 | + output = LogStash::Plugin.lookup("output", "elasticsearch_java").new( |
| 7 | + "protocol" => "transport", |
| 8 | + "network_host" => get_local_host, |
| 9 | + "manage_template" => "false" |
| 10 | + ) |
7 | 11 | # register will try to load jars and raise if it cannot find jars |
8 | 12 | expect {output.register}.to_not raise_error |
9 | 13 | end |
|
15 | 19 | require "logstash/outputs/elasticsearch_java" |
16 | 20 | settings = { |
17 | 21 | "protocol" => "transport", |
| 22 | + "network_host" => get_local_host, |
18 | 23 | "node_name" => "mynode" |
19 | 24 | } |
20 | 25 | next LogStash::Outputs::ElasticSearchJava.new(settings) |
|
27 | 32 | :protocol => "transport", |
28 | 33 | :client_settings => { |
29 | 34 | "client.transport.sniff" => false, |
| 35 | + "network.host" => get_local_host, |
30 | 36 | "node.name" => "mynode" |
31 | 37 | } |
32 | 38 | }) |
|
40 | 46 | settings = { |
41 | 47 | "hosts" => "node01", |
42 | 48 | "protocol" => "transport", |
| 49 | + "network_host" => get_local_host, |
43 | 50 | "sniffing" => true |
44 | 51 | } |
45 | 52 | next LogStash::Outputs::ElasticSearchJava.new(settings) |
|
61 | 68 | settings = { |
62 | 69 | "hosts" => "node01", |
63 | 70 | "protocol" => "transport", |
| 71 | + "network_host" => get_local_host, |
64 | 72 | "sniffing" => false |
65 | 73 | } |
66 | 74 | next LogStash::Outputs::ElasticSearchJava.new(settings) |
|
0 commit comments