fluent-plugin-elasticsearch 4.0.7 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -101,7 +101,7 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
101
101
  assert_nil instance.ssl_max_version
102
102
  assert_nil instance.ssl_min_version
103
103
  if Fluent::Plugin::ElasticsearchTLS::USE_TLS_MINMAX_VERSION
104
- assert_equal({max_version: OpenSSL::SSL::TLS1_VERSION, min_version: OpenSSL::SSL::TLS1_VERSION},
104
+ assert_equal({max_version: OpenSSL::SSL::TLS1_3_VERSION, min_version: OpenSSL::SSL::TLS1_2_VERSION},
105
105
  instance.ssl_version_options)
106
106
  else
107
107
  assert_equal({version: Fluent::Plugin::ElasticsearchTLS::DEFAULT_VERSION},
@@ -147,7 +147,16 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
147
147
  }
148
148
  instance = driver(config).instance
149
149
 
150
- assert_equal "gzip", instance.client.transport.options[:transport_options][:headers]["Content-Encoding"]
150
+ assert_equal nil, instance.client.transport.options[:transport_options][:headers]["Content-Encoding"]
151
+
152
+ stub_request(:post, "http://localhost:9200/_bulk").
153
+ to_return(status: 200, body: "", headers: {})
154
+ driver.run(default_tag: 'test') do
155
+ driver.feed(sample_record)
156
+ end
157
+ compressable = instance.compressable_connection
158
+
159
+ assert_equal "gzip", instance.client(nil, compressable).transport.options[:transport_options][:headers]["Content-Encoding"]
151
160
  end
152
161
 
153
162
  test 'check compression option is passed to transport' do
@@ -158,7 +167,16 @@ class ElasticsearchOutputDynamic < Test::Unit::TestCase
158
167
  }
159
168
  instance = driver(config).instance
160
169
 
161
- assert_equal true, instance.client.transport.options[:compression]
170
+ assert_equal false, instance.client.transport.options[:compression]
171
+
172
+ stub_request(:post, "http://localhost:9200/_bulk").
173
+ to_return(status: 200, body: "", headers: {})
174
+ driver.run(default_tag: 'test') do
175
+ driver.feed(sample_record)
176
+ end
177
+ compressable = instance.compressable_connection
178
+
179
+ assert_equal true, instance.client(nil, compressable).transport.options[:compression]
162
180
  end
163
181
 
164
182
  test 'configure Content-Type' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.7
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - diogo
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-03-23 00:00:00.000000000 Z
13
+ date: 2020-07-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fluentd
@@ -135,6 +135,10 @@ extra_rdoc_files: []
135
135
  files:
136
136
  - ".coveralls.yml"
137
137
  - ".editorconfig"
138
+ - ".github/workflows/issue-auto-closer.yml"
139
+ - ".github/workflows/linux.yml"
140
+ - ".github/workflows/macos.yml"
141
+ - ".github/workflows/windows.yml"
138
142
  - ".gitignore"
139
143
  - ".travis.yml"
140
144
  - CONTRIBUTING.md
@@ -143,6 +147,7 @@ files:
143
147
  - ISSUE_TEMPLATE.md
144
148
  - LICENSE.txt
145
149
  - PULL_REQUEST_TEMPLATE.md
150
+ - README.ElasticsearchGenID.md
146
151
  - README.ElasticsearchInput.md
147
152
  - README.md
148
153
  - Rakefile
@@ -155,6 +160,7 @@ files:
155
160
  - lib/fluent/plugin/elasticsearch_constants.rb
156
161
  - lib/fluent/plugin/elasticsearch_error.rb
157
162
  - lib/fluent/plugin/elasticsearch_error_handler.rb
163
+ - lib/fluent/plugin/elasticsearch_fallback_selector.rb
158
164
  - lib/fluent/plugin/elasticsearch_index_lifecycle_management.rb
159
165
  - lib/fluent/plugin/elasticsearch_index_template.rb
160
166
  - lib/fluent/plugin/elasticsearch_simple_sniffer.rb
@@ -167,6 +173,7 @@ files:
167
173
  - test/helper.rb
168
174
  - test/plugin/test_alias_template.json
169
175
  - test/plugin/test_elasticsearch_error_handler.rb
176
+ - test/plugin/test_elasticsearch_fallback_selector.rb
170
177
  - test/plugin/test_elasticsearch_index_lifecycle_management.rb
171
178
  - test/plugin/test_elasticsearch_tls.rb
172
179
  - test/plugin/test_filter_elasticsearch_genid.rb
@@ -204,6 +211,7 @@ test_files:
204
211
  - test/helper.rb
205
212
  - test/plugin/test_alias_template.json
206
213
  - test/plugin/test_elasticsearch_error_handler.rb
214
+ - test/plugin/test_elasticsearch_fallback_selector.rb
207
215
  - test/plugin/test_elasticsearch_index_lifecycle_management.rb
208
216
  - test/plugin/test_elasticsearch_tls.rb
209
217
  - test/plugin/test_filter_elasticsearch_genid.rb