fluentd 1.9.2-x86-mingw32 → 1.9.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/CHANGELOG.md +37 -0
  4. data/lib/fluent/env.rb +2 -0
  5. data/lib/fluent/plugin/buf_file.rb +12 -4
  6. data/lib/fluent/plugin/buf_file_single.rb +1 -2
  7. data/lib/fluent/plugin/buffer.rb +19 -3
  8. data/lib/fluent/plugin/buffer/chunk.rb +1 -1
  9. data/lib/fluent/plugin/buffer/file_chunk.rb +3 -3
  10. data/lib/fluent/plugin/buffer/file_single_chunk.rb +2 -3
  11. data/lib/fluent/plugin/in_tail.rb +162 -131
  12. data/lib/fluent/plugin/in_unix.rb +0 -6
  13. data/lib/fluent/plugin/out_file.rb +6 -28
  14. data/lib/fluent/plugin/out_secondary_file.rb +2 -4
  15. data/lib/fluent/plugin/output.rb +1 -1
  16. data/lib/fluent/plugin/parser_multiline.rb +48 -2
  17. data/lib/fluent/plugin_helper/server.rb +5 -1
  18. data/lib/fluent/plugin_id.rb +1 -1
  19. data/lib/fluent/supervisor.rb +11 -3
  20. data/lib/fluent/version.rb +1 -1
  21. data/test/command/test_fluentd.rb +31 -2
  22. data/test/plugin/test_buf_file.rb +84 -4
  23. data/test/plugin/test_buf_file_single.rb +2 -2
  24. data/test/plugin/test_buffer.rb +18 -2
  25. data/test/plugin/test_buffer_file_chunk.rb +13 -12
  26. data/test/plugin/test_buffer_file_single_chunk.rb +1 -1
  27. data/test/plugin/test_in_tail.rb +82 -29
  28. data/test/plugin/test_out_copy.rb +3 -0
  29. data/test/plugin/test_output_as_buffered_backup.rb +48 -0
  30. data/test/plugin/test_parser_multiline.rb +11 -0
  31. data/test/plugin_helper/data/cert/generate_cert.rb +2 -2
  32. data/test/plugin_helper/data/cert/with_ca/ca-cert-key-pass.pem +26 -26
  33. data/test/plugin_helper/data/cert/with_ca/ca-cert-key.pem +25 -25
  34. data/test/plugin_helper/data/cert/with_ca/ca-cert-pass.pem +18 -18
  35. data/test/plugin_helper/data/cert/with_ca/ca-cert.pem +18 -18
  36. data/test/plugin_helper/data/cert/with_ca/cert-key-pass.pem +26 -26
  37. data/test/plugin_helper/data/cert/with_ca/cert-key.pem +25 -25
  38. data/test/plugin_helper/data/cert/with_ca/cert-pass.pem +19 -19
  39. data/test/plugin_helper/data/cert/with_ca/cert.pem +18 -18
  40. data/test/plugin_helper/data/cert/without_ca/cert-key-pass.pem +26 -26
  41. data/test/plugin_helper/data/cert/without_ca/cert-key.pem +25 -25
  42. data/test/plugin_helper/data/cert/without_ca/cert-pass.pem +17 -17
  43. data/test/plugin_helper/data/cert/without_ca/cert.pem +17 -17
  44. data/test/plugin_helper/test_http_server_helper.rb +1 -9
  45. data/test/test_logger_initializer.rb +20 -0
  46. data/test/test_plugin_id.rb +18 -0
  47. data/test/test_supervisor.rb +1 -1
  48. metadata +2 -2
@@ -1,20 +1,20 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDUzCCAjugAwIBAgILAL/IBPUBfvN0YjkwDQYJKoZIhvcNAQELBQAwVzELMAkG
2
+ MIIDVTCCAj2gAwIBAgILALCfeVLdPoGOQEcwDQYJKoZIhvcNAQELBQAwVzELMAkG
3
3
  A1UEBhMCVVMxCzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MSMw
4
- IQYDVQQDDBpzZXJ2ZXIudGVzdGluZy5mbHVlbnRkLm9yZzAeFw03MDAxMDEwMDAw
5
- MDBaFw0yMDAyMjEwNzEzMjhaMFcxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTEW
6
- MBQGA1UEBwwNTW91bnRhaW4gVmlldzEjMCEGA1UEAwwac2VydmVyLnRlc3Rpbmcu
7
- Zmx1ZW50ZC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaAQiU
8
- VPe4LFp438/nU+f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AL/f
8
+ VVxZDKnU//+KdJV0yJQOvLT95E0wJmHpsot519iuSNNzCzvTl6VOqzT/yQN/X4dm
9
+ 5PPZWvJdY5Q0c1DvnSsWGZ8mdAZ2Ank7EjOSZyfekve3FRGUUanbaQK4yqWiC93Z
10
+ 50pNI/uu3vpcY/2Gyos3BK7740Z7ytD+xeSbW7rFEDEIC1BtT8DL4ojZKz+NA4ij
11
+ mIxGkmFUh/VbQYA19MdaC4ywWVEuxw+5bztHEiJXB57NDTcsZa4mwz1tFSoOMGxG
12
+ tamaVRZcUh7nX4v2VCpQJvCG+4zeHc6QPaTK4RQZf70rZ1qXM2GIN53B4TKOhDsc
13
+ gcslfohL/bUeMp2zruUCAwEAAaMgMB4wCQYDVR0TBAIwADARBglghkgBhvhCAQEE
14
+ BAMCBkAwDQYJKoZIhvcNAQELBQADggEBAJ5U5HGK2lmK6NKQGw63tbBqQ38tSCix
15
+ a3OwOQ9M4KeVGgAiG6fgESgv0AAN37pzoNRQ1soPOIazovdsbKUcec/cbMQoODuO
16
+ g9KqueecB0BkSgIQXJWtoFWn1m9I/11VnbCbv1fYsui5fKANL9V6QUa052oNu1X+
17
+ 8I6FQpgzcY3sGw8jiu1sQYBg6wIQJfl4bf6wQBqVhUeaSeY++1F1SNuB0k6H2DgA
18
+ OgGULEvcIb0dvSh/luOpIHoUsyv77aKWnC3LSwUD/M8/Lv43bcJKfDT2KjLeW8DX
19
+ lCMESmm0ppShIa/fobNxq2Ale6oFxHma2t7pG8ZxCxn5ojiFQ3R6Lz0=
20
20
  -----END CERTIFICATE-----
@@ -161,20 +161,12 @@ class HtttpHelperTest < Test::Unit::TestCase
161
161
  assert_equal(nil, resp.body)
162
162
  assert_equal('text/plain', resp['Content-Type'])
163
163
 
164
- %w[get put post put delete trace].each do |n|
164
+ %w[get put post put delete options trace].each do |n|
165
165
  resp = send(n, "http://127.0.0.1:#{PORT}/example/hello")
166
166
  assert_equal('200', resp.code)
167
167
  assert_equal("hello #{n}", resp.body)
168
168
  assert_equal('text/plain', resp['Content-Type'])
169
169
  end
170
-
171
- # TODO: remove when fluentd drop ruby 2.1
172
- if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create('2.2.0')
173
- resp = options("http://127.0.0.1:#{PORT}/example/hello")
174
- assert_equal('200', resp.code)
175
- assert_equal("hello options", resp.body)
176
- assert_equal('text/plain', resp['Content-Type'])
177
- end
178
170
  end
179
171
  end
180
172
 
@@ -17,10 +17,30 @@ class LoggerInitializerTest < ::Test::Unit::TestCase
17
17
 
18
18
  assert_false File.exist?(TMP_DIR)
19
19
  logger = Fluent::Supervisor::LoggerInitializer.new(path, Fluent::Log::LEVEL_DEBUG, nil, nil, {})
20
+ mock.proxy(File).chmod(0o777, TMP_DIR).never
20
21
 
21
22
  assert_nothing_raised do
22
23
  logger.init(:supervisor, 0)
23
24
  end
25
+
26
+ assert_true File.exist?(TMP_DIR)
27
+ end
28
+
29
+ test 'apply_options with log_dir_perm' do
30
+ omit "NTFS doesn't support UNIX like permissions" if Fluent.windows?
31
+
32
+ path = File.join(TMP_DIR, 'fluent_with_path.log')
33
+
34
+ assert_false File.exist?(TMP_DIR)
35
+ logger = Fluent::Supervisor::LoggerInitializer.new(path, Fluent::Log::LEVEL_DEBUG, nil, nil, {})
36
+ mock.proxy(File).chmod(0o777, TMP_DIR).once
37
+
38
+ assert_nothing_raised do
39
+ logger.init(:supervisor, 0)
40
+ end
41
+
42
+ logger.apply_options(log_dir_perm: 0o777)
24
43
  assert_true File.exist?(TMP_DIR)
44
+ assert_equal 0o777, (File.stat(TMP_DIR).mode & 0xFFF)
25
45
  end
26
46
  end
@@ -97,5 +97,23 @@ class PluginIdTest < Test::Unit::TestCase
97
97
  ENV['SERVERENGINE_WORKER_ID'] = prev_env_val
98
98
  end
99
99
  end
100
+
101
+ test '#plugin_root_dir create dirctory with specify mode if not exists ' do
102
+ omit "NTFS doesn't support UNIX like permissions" if Fluent.windows?
103
+
104
+ root_dir = Fluent::SystemConfig.overwrite_system_config({ 'root_dir' => File.join(TMP_DIR, "myroot"), 'dir_permission' => '0777' }) do
105
+ @p.plugin_root_dir
106
+ end
107
+
108
+ assert_equal '777', File.stat(root_dir).mode.to_s(8)[-3, 3]
109
+ end
110
+
111
+ test '#plugin_root_dir create dirctory with default permission if not exists ' do
112
+ root_dir = Fluent::SystemConfig.overwrite_system_config({ 'root_dir' => File.join(TMP_DIR, "myroot") }) do
113
+ @p.plugin_root_dir
114
+ end
115
+
116
+ assert_equal '755', File.stat(root_dir).mode.to_s(8)[-3, 3]
117
+ end
100
118
  end
101
119
  end
@@ -161,7 +161,7 @@ class SupervisorTest < ::Test::Unit::TestCase
161
161
 
162
162
  assert{ $log.out.logs.first.end_with?(info_msg) }
163
163
  ensure
164
- $log.out.reset
164
+ $log.out.reset if $log.out.is_a?(Fluent::Test::DummyLogDevice)
165
165
  end
166
166
 
167
167
  def test_load_config
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
4
+ version: 1.9.3
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-13 00:00:00.000000000 Z
11
+ date: 2020-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack