fluent-plugin-elasticsearch 4.0.6 → 4.0.11

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.6
4
+ version: 4.0.11
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-12 00:00:00.000000000 Z
13
+ date: 2020-07-09 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