fluentd 0.14.5-x86-mingw32 → 0.14.7-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 (103) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +55 -0
  3. data/bin/fluent-binlog-reader +7 -0
  4. data/example/in_dummy_with_compression.conf +23 -0
  5. data/lib/fluent/agent.rb +8 -12
  6. data/lib/fluent/command/binlog_reader.rb +234 -0
  7. data/lib/fluent/command/fluentd.rb +17 -1
  8. data/lib/fluent/compat/file_util.rb +1 -1
  9. data/lib/fluent/compat/output.rb +5 -1
  10. data/lib/fluent/config/configure_proxy.rb +18 -3
  11. data/lib/fluent/config/element.rb +1 -1
  12. data/lib/fluent/config/section.rb +1 -1
  13. data/lib/fluent/config/v1_parser.rb +1 -1
  14. data/lib/fluent/env.rb +1 -0
  15. data/lib/fluent/event.rb +49 -2
  16. data/lib/fluent/event_router.rb +6 -2
  17. data/lib/fluent/label.rb +8 -0
  18. data/lib/fluent/log.rb +30 -1
  19. data/lib/fluent/plugin.rb +1 -1
  20. data/lib/fluent/plugin/base.rb +3 -0
  21. data/lib/fluent/plugin/buf_file.rb +2 -2
  22. data/lib/fluent/plugin/buf_memory.rb +1 -1
  23. data/lib/fluent/plugin/buffer.rb +12 -2
  24. data/lib/fluent/plugin/buffer/chunk.rb +68 -7
  25. data/lib/fluent/plugin/buffer/file_chunk.rb +4 -4
  26. data/lib/fluent/plugin/buffer/memory_chunk.rb +4 -4
  27. data/lib/fluent/plugin/compressable.rb +91 -0
  28. data/lib/fluent/plugin/filter_grep.rb +4 -4
  29. data/lib/fluent/plugin/formatter.rb +2 -2
  30. data/lib/fluent/plugin/formatter_json.rb +2 -1
  31. data/lib/fluent/plugin/formatter_out_file.rb +3 -30
  32. data/lib/fluent/plugin/in_forward.rb +6 -5
  33. data/lib/fluent/plugin/in_monitor_agent.rb +7 -21
  34. data/lib/fluent/plugin/in_syslog.rb +1 -1
  35. data/lib/fluent/plugin/in_tail.rb +11 -2
  36. data/lib/fluent/plugin/multi_output.rb +63 -3
  37. data/lib/fluent/plugin/out_exec.rb +1 -1
  38. data/lib/fluent/plugin/out_file.rb +5 -1
  39. data/lib/fluent/plugin/out_forward.rb +17 -5
  40. data/lib/fluent/plugin/out_stdout.rb +2 -1
  41. data/lib/fluent/plugin/output.rb +205 -19
  42. data/lib/fluent/plugin/parser.rb +5 -49
  43. data/lib/fluent/plugin/parser_apache2.rb +1 -1
  44. data/lib/fluent/plugin/parser_json.rb +4 -4
  45. data/lib/fluent/plugin/parser_multiline.rb +5 -5
  46. data/lib/fluent/plugin/parser_regexp.rb +1 -2
  47. data/lib/fluent/plugin/parser_syslog.rb +2 -2
  48. data/lib/fluent/plugin/storage_local.rb +2 -1
  49. data/lib/fluent/plugin_helper.rb +1 -0
  50. data/lib/fluent/plugin_helper/compat_parameters.rb +39 -21
  51. data/lib/fluent/plugin_helper/extract.rb +92 -0
  52. data/lib/fluent/plugin_helper/inject.rb +10 -12
  53. data/lib/fluent/plugin_helper/thread.rb +23 -3
  54. data/lib/fluent/registry.rb +1 -1
  55. data/lib/fluent/root_agent.rb +2 -1
  56. data/lib/fluent/supervisor.rb +28 -8
  57. data/lib/fluent/test/base.rb +0 -7
  58. data/lib/fluent/test/driver/base.rb +1 -0
  59. data/lib/fluent/test/driver/output.rb +3 -0
  60. data/lib/fluent/test/helpers.rb +18 -0
  61. data/lib/fluent/test/input_test.rb +4 -2
  62. data/lib/fluent/test/log.rb +3 -1
  63. data/lib/fluent/time.rb +232 -1
  64. data/lib/fluent/timezone.rb +1 -1
  65. data/lib/fluent/version.rb +1 -1
  66. data/test/command/test_binlog_reader.rb +351 -0
  67. data/test/config/test_config_parser.rb +6 -0
  68. data/test/config/test_configurable.rb +47 -1
  69. data/test/helper.rb +0 -1
  70. data/test/plugin/test_buffer.rb +22 -2
  71. data/test/plugin/test_buffer_chunk.rb +34 -4
  72. data/test/plugin/test_buffer_file_chunk.rb +73 -0
  73. data/test/plugin/test_buffer_memory_chunk.rb +73 -0
  74. data/test/plugin/test_compressable.rb +81 -0
  75. data/test/plugin/test_formatter_json.rb +14 -1
  76. data/test/plugin/test_in_forward.rb +67 -3
  77. data/test/plugin/test_in_monitor_agent.rb +17 -1
  78. data/test/plugin/test_in_tail.rb +8 -8
  79. data/test/plugin/test_out_file.rb +0 -8
  80. data/test/plugin/test_out_forward.rb +85 -0
  81. data/test/plugin/test_out_secondary_file.rb +20 -12
  82. data/test/plugin/test_out_stdout.rb +11 -10
  83. data/test/plugin/test_output.rb +234 -0
  84. data/test/plugin/test_output_as_buffered.rb +223 -0
  85. data/test/plugin/test_output_as_buffered_compress.rb +165 -0
  86. data/test/plugin/test_parser_json.rb +8 -0
  87. data/test/plugin/test_parser_regexp.rb +1 -1
  88. data/test/plugin_helper/test_child_process.rb +2 -2
  89. data/test/plugin_helper/test_extract.rb +195 -0
  90. data/test/plugin_helper/test_inject.rb +0 -7
  91. data/test/scripts/fluent/plugin/formatter1/formatter_test1.rb +7 -0
  92. data/test/scripts/fluent/plugin/formatter2/formatter_test2.rb +7 -0
  93. data/test/test_event.rb +186 -0
  94. data/test/test_event_router.rb +1 -1
  95. data/test/test_formatter.rb +0 -7
  96. data/test/test_log.rb +121 -0
  97. data/test/test_plugin_classes.rb +62 -0
  98. data/test/test_root_agent.rb +125 -0
  99. data/test/test_supervisor.rb +25 -2
  100. data/test/test_time_formatter.rb +103 -7
  101. data/test/test_time_parser.rb +211 -0
  102. metadata +22 -4
  103. data/test/plugin/test_parser_time.rb +0 -46
@@ -0,0 +1,211 @@
1
+ require_relative 'helper'
2
+ require 'fluent/test'
3
+ require 'fluent/time'
4
+
5
+ class TimeParserTest < ::Test::Unit::TestCase
6
+ def setup
7
+ Fluent::Test.setup
8
+ end
9
+
10
+ def test_call_with_parse
11
+ parser = Fluent::TimeParser.new
12
+
13
+ assert(parser.parse('2013-09-18 12:00:00 +0900').is_a?(Fluent::EventTime))
14
+
15
+ time = event_time('2013-09-18 12:00:00 +0900')
16
+ assert_equal(time, parser.parse('2013-09-18 12:00:00 +0900'))
17
+ end
18
+
19
+ def test_parse_with_strptime
20
+ parser = Fluent::TimeParser.new('%d/%b/%Y:%H:%M:%S %z')
21
+
22
+ assert(parser.parse('28/Feb/2013:12:00:00 +0900').is_a?(Fluent::EventTime))
23
+
24
+ time = event_time('28/Feb/2013:12:00:00 +0900', format: '%d/%b/%Y:%H:%M:%S %z')
25
+ assert_equal(time, parser.parse('28/Feb/2013:12:00:00 +0900'))
26
+ end
27
+
28
+ def test_parse_nsec_with_strptime
29
+ parser = Fluent::TimeParser.new('%d/%b/%Y:%H:%M:%S:%N %z')
30
+
31
+ assert(parser.parse('28/Feb/2013:12:00:00:123456789 +0900').is_a?(Fluent::EventTime))
32
+
33
+ time = event_time('28/Feb/2013:12:00:00:123456789 +0900', format: '%d/%b/%Y:%H:%M:%S:%N %z')
34
+ assert_equal_event_time(time, parser.parse('28/Feb/2013:12:00:00:123456789 +0900'))
35
+ end
36
+
37
+ def test_parse_with_invalid_argument
38
+ parser = Fluent::TimeParser.new
39
+
40
+ [[], {}, nil, true, 10000, //, ->{}, '', :symbol].each { |v|
41
+ assert_raise Fluent::TimeParser::TimeParseError do
42
+ parser.parse(v)
43
+ end
44
+ }
45
+ end
46
+
47
+ def test_parse_time_in_localtime
48
+ time = with_timezone("UTC+02") do
49
+ parser = Fluent::TimeParser.new("%Y-%m-%d %H:%M:%S.%N", true)
50
+ parser.parse("2016-09-02 18:42:31.123456789")
51
+ end
52
+ assert_equal_event_time(time, event_time("2016-09-02 18:42:31.123456789 -02:00", format: '%Y-%m-%d %H:%M:%S.%N %z'))
53
+ end
54
+
55
+ def test_parse_time_in_utc
56
+ time = with_timezone("UTC-09") do
57
+ parser = Fluent::TimeParser.new("%Y-%m-%d %H:%M:%S.%N", false)
58
+ parser.parse("2016-09-02 18:42:31.123456789")
59
+ end
60
+ assert_equal_event_time(time, event_time("2016-09-02 18:42:31.123456789 UTC", format: '%Y-%m-%d %H:%M:%S.%N %z'))
61
+ end
62
+
63
+ def test_parse_string_with_expected_timezone
64
+ time = with_timezone("UTC-09") do
65
+ parser = Fluent::TimeParser.new("%Y-%m-%d %H:%M:%S.%N", nil, "-07:00")
66
+ parser.parse("2016-09-02 18:42:31.123456789")
67
+ end
68
+ assert_equal_event_time(time, event_time("2016-09-02 18:42:31.123456789 -07:00", format: '%Y-%m-%d %H:%M:%S.%N %z'))
69
+ end
70
+
71
+ sub_test_case 'TimeMixin::Parser' do
72
+ class DummyForTimeParser
73
+ include Fluent::Configurable
74
+ include Fluent::TimeMixin::Parser
75
+ end
76
+
77
+ test 'provides configuration parameters for TimeParser with default values for localtime' do
78
+ time = with_timezone("UTC+07") do
79
+ i = DummyForTimeParser.new
80
+ i.configure(config_element('parse'))
81
+
82
+ assert_nil i.time_format
83
+ assert_true i.localtime
84
+ assert_false i.utc
85
+ assert_nil i.timezone
86
+
87
+ parser = i.time_parser_create
88
+ # time_format unspecified
89
+ # localtime
90
+ parser.parse("2016-09-02 18:42:31.012345678")
91
+ end
92
+ assert_equal_event_time(event_time("2016-09-02 18:42:31.012345678 -07:00", format: '%Y-%m-%d %H:%M:%S.%N %z'), time)
93
+ end
94
+
95
+ test 'provides configuration parameters for TimeParser, configurable for any time format' do
96
+ time = with_timezone("UTC+07") do
97
+ i = DummyForTimeParser.new
98
+ i.configure(config_element('parse', '', {'time_format' => '%m/%d/%Y %H-%M-%S %N'}))
99
+ parser = i.time_parser_create
100
+ # time_format specified
101
+ # localtime
102
+ parser.parse("09/02/2016 18-42-31 012345678")
103
+ end
104
+ assert_equal_event_time(event_time("2016-09-02 18:42:31.012345678 -07:00", format: '%Y-%m-%d %H:%M:%S.%N %z'), time)
105
+ end
106
+
107
+ test 'provides configuration parameters for TimeParser, configurable for UTC by localtime=false' do
108
+ time = with_timezone("UTC+07") do
109
+ i = DummyForTimeParser.new
110
+ i.configure(config_element('parse', '', {'time_format' => '%m/%d/%Y %H-%M-%S %N', 'localtime' => 'false'}))
111
+ parser = i.time_parser_create
112
+ # time_format specified
113
+ # utc
114
+ parser.parse("09/02/2016 18-42-31 012345678")
115
+ end
116
+ assert_equal_event_time(event_time("2016-09-02 18:42:31.012345678 UTC", format: '%Y-%m-%d %H:%M:%S.%N %z'), time)
117
+ end
118
+
119
+ test 'provides configuration parameters for TimeParser, configurable for UTC by utc=true' do
120
+ time = with_timezone("UTC+07") do
121
+ i = DummyForTimeParser.new
122
+ i.configure(config_element('parse', '', {'time_format' => '%m/%d/%Y %H-%M-%S %N', 'utc' => 'true'}))
123
+ parser = i.time_parser_create
124
+ # time_format specified
125
+ # utc
126
+ parser.parse("09/02/2016 18-42-31 012345678")
127
+ end
128
+ assert_equal_event_time(event_time("2016-09-02 18:42:31.012345678 UTC", format: '%Y-%m-%d %H:%M:%S.%N %z'), time)
129
+ end
130
+
131
+ test 'provides configuration parameters for TimeParser, configurable for any timezone' do
132
+ time = with_timezone("UTC+07") do
133
+ i = DummyForTimeParser.new
134
+ i.configure(config_element('parse', '', {'time_format' => '%m/%d/%Y %H-%M-%S %N', 'timezone' => '-01:00'}))
135
+ parser = i.time_parser_create
136
+ # time_format specified
137
+ # -01:00
138
+ parser.parse("09/02/2016 18-42-31 012345678")
139
+ end
140
+ assert_equal_event_time(event_time("2016-09-02 18:42:31.012345678 -01:00", format: '%Y-%m-%d %H:%M:%S.%N %z'), time)
141
+ end
142
+
143
+ test 'specifying timezone without time format raises configuration error' do
144
+ assert_raise Fluent::ConfigError.new("specifying timezone requires time format") do
145
+ i = DummyForTimeParser.new
146
+ i.configure(config_element('parse', '', {'utc' => 'true'}))
147
+ i.time_parser_create
148
+ end
149
+ assert_raise Fluent::ConfigError.new("specifying timezone requires time format") do
150
+ i = DummyForTimeParser.new
151
+ i.configure(config_element('parse', '', {'localtime' => 'false'}))
152
+ i.time_parser_create
153
+ end
154
+ assert_raise Fluent::ConfigError.new("specifying timezone requires time format") do
155
+ i = DummyForTimeParser.new
156
+ i.configure(config_element('parse', '', {'timezone' => '-0700'}))
157
+ i.time_parser_create
158
+ end
159
+ end
160
+
161
+ test '#time_parser_create returns TimeParser with specified time format and timezone' do
162
+ time = with_timezone("UTC-09") do
163
+ i = DummyForTimeParser.new
164
+ i.configure(config_element('parse', '', {'time_format' => '%m/%d/%Y %H-%M-%S %N'}))
165
+ assert_equal '%m/%d/%Y %H-%M-%S %N', i.time_format
166
+ assert_true i.localtime
167
+ parser = i.time_parser_create(format: '%Y-%m-%d %H:%M:%S.%N %z')
168
+ parser.parse("2016-09-05 17:59:38.987654321 -03:00")
169
+ end
170
+ assert_equal_event_time(event_time("2016-09-05 17:59:38.987654321 -03:00", format: '%Y-%m-%d %H:%M:%S.%N %z'), time)
171
+ end
172
+
173
+ test '#time_parser_create returns TimeParser with localtime when specified it forcedly besides any configuration parameters' do
174
+ time = with_timezone("UTC-09") do
175
+ i = DummyForTimeParser.new
176
+ i.configure(config_element('parse', '', {'time_format' => '%m/%d/%Y %H-%M-%S', 'utc' => 'true'}))
177
+ assert_equal '%m/%d/%Y %H-%M-%S', i.time_format
178
+ assert_true i.utc
179
+ parser = i.time_parser_create(format: '%Y-%m-%d %H:%M:%S.%N', force_localtime: true)
180
+ parser.parse("2016-09-05 17:59:38.987654321")
181
+ end
182
+ assert_equal_event_time(event_time("2016-09-05 17:59:38.987654321 +09:00", format: '%Y-%m-%d %H:%M:%S.%N %z'), time)
183
+
184
+ time = with_timezone("UTC-09") do
185
+ i = DummyForTimeParser.new
186
+ i.configure(config_element('parse', '', {'time_format' => '%m/%d/%Y %H-%M-%S', 'timezone' => '+0000'}))
187
+ assert_equal '%m/%d/%Y %H-%M-%S', i.time_format
188
+ assert_equal '+0000', i.timezone
189
+ parser = i.time_parser_create(format: '%Y-%m-%d %H:%M:%S.%N', force_localtime: true)
190
+ parser.parse("2016-09-05 17:59:38.987654321")
191
+ end
192
+ assert_equal_event_time(event_time("2016-09-05 17:59:38.987654321 +09:00", format: '%Y-%m-%d %H:%M:%S.%N %z'), time)
193
+ end
194
+
195
+ test '#time_parser_create returns NumericTimeParser to parse time as unixtime when time_type unixtime specified' do
196
+ i = DummyForTimeParser.new
197
+ i.configure(config_element('parse', '', {'time_type' => 'unixtime'}))
198
+ parser = i.time_parser_create
199
+ time = event_time("2016-10-03 20:08:30.123456789 +0100", format: '%Y-%m-%d %H:%M:%S.%N %z')
200
+ assert_equal_event_time(Fluent::EventTime.new(time.to_i), parser.parse("#{time.sec}"))
201
+ end
202
+
203
+ test '#time_parser_create returns NumericTimeParser to parse time as float when time_type float specified' do
204
+ i = DummyForTimeParser.new
205
+ i.configure(config_element('parse', '', {'time_type' => 'float'}))
206
+ parser = i.time_parser_create
207
+ time = event_time("2016-10-03 20:08:30.123456789 +0100", format: '%Y-%m-%d %H:%M:%S.%N %z')
208
+ assert_equal_event_time(time, parser.parse("#{time.sec}.#{time.nsec}"))
209
+ end
210
+ end
211
+ end
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: 0.14.5
4
+ version: 0.14.7
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: 2016-09-06 00:00:00.000000000 Z
11
+ date: 2016-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -335,6 +335,7 @@ description: Fluentd is an open source data collector designed to scale and simp
335
335
  email:
336
336
  - frsyuki@gmail.com
337
337
  executables:
338
+ - fluent-binlog-reader
338
339
  - fluent-cat
339
340
  - fluent-debug
340
341
  - fluent-gem
@@ -354,12 +355,14 @@ files:
354
355
  - Rakefile
355
356
  - Vagrantfile
356
357
  - appveyor.yml
358
+ - bin/fluent-binlog-reader
357
359
  - bin/fluent-cat
358
360
  - bin/fluent-debug
359
361
  - bin/fluent-gem
360
362
  - bin/fluentd
361
363
  - example/copy_roundrobin.conf
362
364
  - example/filter_stdout.conf
365
+ - example/in_dummy_with_compression.conf
363
366
  - example/in_forward.conf
364
367
  - example/in_forward_client.conf
365
368
  - example/in_forward_shared_key.conf
@@ -385,6 +388,7 @@ files:
385
388
  - fluent.conf
386
389
  - fluentd.gemspec
387
390
  - lib/fluent/agent.rb
391
+ - lib/fluent/command/binlog_reader.rb
388
392
  - lib/fluent/command/bundler_injection.rb
389
393
  - lib/fluent/command/cat.rb
390
394
  - lib/fluent/command/debug.rb
@@ -448,6 +452,7 @@ files:
448
452
  - lib/fluent/plugin/buffer/chunk.rb
449
453
  - lib/fluent/plugin/buffer/file_chunk.rb
450
454
  - lib/fluent/plugin/buffer/memory_chunk.rb
455
+ - lib/fluent/plugin/compressable.rb
451
456
  - lib/fluent/plugin/exec_util.rb
452
457
  - lib/fluent/plugin/file_util.rb
453
458
  - lib/fluent/plugin/file_wrapper.rb
@@ -514,6 +519,7 @@ files:
514
519
  - lib/fluent/plugin_helper/compat_parameters.rb
515
520
  - lib/fluent/plugin_helper/event_emitter.rb
516
521
  - lib/fluent/plugin_helper/event_loop.rb
522
+ - lib/fluent/plugin_helper/extract.rb
517
523
  - lib/fluent/plugin_helper/formatter.rb
518
524
  - lib/fluent/plugin_helper/inject.rb
519
525
  - lib/fluent/plugin_helper/parser.rb
@@ -554,6 +560,7 @@ files:
554
560
  - lib/fluent/unique_id.rb
555
561
  - lib/fluent/version.rb
556
562
  - lib/fluent/winsvc.rb
563
+ - test/command/test_binlog_reader.rb
557
564
  - test/compat/test_calls_super.rb
558
565
  - test/compat/test_parser.rb
559
566
  - test/config/assertions.rb
@@ -581,6 +588,7 @@ files:
581
588
  - test/plugin/test_buffer_chunk.rb
582
589
  - test/plugin/test_buffer_file_chunk.rb
583
590
  - test/plugin/test_buffer_memory_chunk.rb
591
+ - test/plugin/test_compressable.rb
584
592
  - test/plugin/test_file_util.rb
585
593
  - test/plugin/test_filter.rb
586
594
  - test/plugin/test_filter_grep.rb
@@ -620,6 +628,7 @@ files:
620
628
  - test/plugin/test_out_stream.rb
621
629
  - test/plugin/test_output.rb
622
630
  - test/plugin/test_output_as_buffered.rb
631
+ - test/plugin/test_output_as_buffered_compress.rb
623
632
  - test/plugin/test_output_as_buffered_overflow.rb
624
633
  - test/plugin/test_output_as_buffered_retries.rb
625
634
  - test/plugin/test_output_as_buffered_secondary.rb
@@ -637,7 +646,6 @@ files:
637
646
  - test/plugin/test_parser_none.rb
638
647
  - test/plugin/test_parser_regexp.rb
639
648
  - test/plugin/test_parser_syslog.rb
640
- - test/plugin/test_parser_time.rb
641
649
  - test/plugin/test_parser_tsv.rb
642
650
  - test/plugin/test_storage.rb
643
651
  - test/plugin/test_storage_local.rb
@@ -646,6 +654,7 @@ files:
646
654
  - test/plugin_helper/test_compat_parameters.rb
647
655
  - test/plugin_helper/test_event_emitter.rb
648
656
  - test/plugin_helper/test_event_loop.rb
657
+ - test/plugin_helper/test_extract.rb
649
658
  - test/plugin_helper/test_formatter.rb
650
659
  - test/plugin_helper/test_inject.rb
651
660
  - test/plugin_helper/test_parser.rb
@@ -654,6 +663,8 @@ files:
654
663
  - test/plugin_helper/test_thread.rb
655
664
  - test/plugin_helper/test_timer.rb
656
665
  - test/scripts/exec_script.rb
666
+ - test/scripts/fluent/plugin/formatter1/formatter_test1.rb
667
+ - test/scripts/fluent/plugin/formatter2/formatter_test2.rb
657
668
  - test/scripts/fluent/plugin/formatter_known.rb
658
669
  - test/scripts/fluent/plugin/out_test.rb
659
670
  - test/scripts/fluent/plugin/out_test2.rb
@@ -676,6 +687,7 @@ files:
676
687
  - test/test_root_agent.rb
677
688
  - test/test_supervisor.rb
678
689
  - test/test_time_formatter.rb
690
+ - test/test_time_parser.rb
679
691
  - test/test_unique_id.rb
680
692
  homepage: http://fluentd.org/
681
693
  licenses:
@@ -702,6 +714,7 @@ signing_key:
702
714
  specification_version: 4
703
715
  summary: Fluentd event collector
704
716
  test_files:
717
+ - test/command/test_binlog_reader.rb
705
718
  - test/compat/test_calls_super.rb
706
719
  - test/compat/test_parser.rb
707
720
  - test/config/assertions.rb
@@ -729,6 +742,7 @@ test_files:
729
742
  - test/plugin/test_buffer_chunk.rb
730
743
  - test/plugin/test_buffer_file_chunk.rb
731
744
  - test/plugin/test_buffer_memory_chunk.rb
745
+ - test/plugin/test_compressable.rb
732
746
  - test/plugin/test_file_util.rb
733
747
  - test/plugin/test_filter.rb
734
748
  - test/plugin/test_filter_grep.rb
@@ -768,6 +782,7 @@ test_files:
768
782
  - test/plugin/test_out_stream.rb
769
783
  - test/plugin/test_output.rb
770
784
  - test/plugin/test_output_as_buffered.rb
785
+ - test/plugin/test_output_as_buffered_compress.rb
771
786
  - test/plugin/test_output_as_buffered_overflow.rb
772
787
  - test/plugin/test_output_as_buffered_retries.rb
773
788
  - test/plugin/test_output_as_buffered_secondary.rb
@@ -785,7 +800,6 @@ test_files:
785
800
  - test/plugin/test_parser_none.rb
786
801
  - test/plugin/test_parser_regexp.rb
787
802
  - test/plugin/test_parser_syslog.rb
788
- - test/plugin/test_parser_time.rb
789
803
  - test/plugin/test_parser_tsv.rb
790
804
  - test/plugin/test_storage.rb
791
805
  - test/plugin/test_storage_local.rb
@@ -794,6 +808,7 @@ test_files:
794
808
  - test/plugin_helper/test_compat_parameters.rb
795
809
  - test/plugin_helper/test_event_emitter.rb
796
810
  - test/plugin_helper/test_event_loop.rb
811
+ - test/plugin_helper/test_extract.rb
797
812
  - test/plugin_helper/test_formatter.rb
798
813
  - test/plugin_helper/test_inject.rb
799
814
  - test/plugin_helper/test_parser.rb
@@ -802,6 +817,8 @@ test_files:
802
817
  - test/plugin_helper/test_thread.rb
803
818
  - test/plugin_helper/test_timer.rb
804
819
  - test/scripts/exec_script.rb
820
+ - test/scripts/fluent/plugin/formatter1/formatter_test1.rb
821
+ - test/scripts/fluent/plugin/formatter2/formatter_test2.rb
805
822
  - test/scripts/fluent/plugin/formatter_known.rb
806
823
  - test/scripts/fluent/plugin/out_test.rb
807
824
  - test/scripts/fluent/plugin/out_test2.rb
@@ -824,5 +841,6 @@ test_files:
824
841
  - test/test_root_agent.rb
825
842
  - test/test_supervisor.rb
826
843
  - test/test_time_formatter.rb
844
+ - test/test_time_parser.rb
827
845
  - test/test_unique_id.rb
828
846
  has_rdoc: false
@@ -1,46 +0,0 @@
1
- require_relative '../helper'
2
- require 'fluent/test/driver/parser'
3
- require 'fluent/plugin/parser'
4
-
5
- class TimeParserTest < ::Test::Unit::TestCase
6
- def setup
7
- Fluent::Test.setup
8
- end
9
-
10
- def test_call_with_parse
11
- parser = Fluent::Test::Driver::Parser.new(Fluent::Plugin::Parser::TimeParser.new(nil))
12
-
13
- assert(parser.instance.parse('2013-09-18 12:00:00 +0900').is_a?(Fluent::EventTime))
14
-
15
- time = event_time('2013-09-18 12:00:00 +0900')
16
- assert_equal(time, parser.instance.parse('2013-09-18 12:00:00 +0900'))
17
- end
18
-
19
- def test_parse_with_strptime
20
- parser = Fluent::Test::Driver::Parser.new(Fluent::Plugin::Parser::TimeParser.new('%d/%b/%Y:%H:%M:%S %z'))
21
-
22
- assert(parser.instance.parse('28/Feb/2013:12:00:00 +0900').is_a?(Fluent::EventTime))
23
-
24
- time = event_time('28/Feb/2013:12:00:00 +0900', format: '%d/%b/%Y:%H:%M:%S %z')
25
- assert_equal(time, parser.instance.parse('28/Feb/2013:12:00:00 +0900'))
26
- end
27
-
28
- def test_parse_nsec_with_strptime
29
- parser = Fluent::Test::Driver::Parser.new(Fluent::Plugin::Parser::TimeParser.new('%d/%b/%Y:%H:%M:%S:%N %z'))
30
-
31
- assert(parser.instance.parse('28/Feb/2013:12:00:00:123456789 +0900').is_a?(Fluent::EventTime))
32
-
33
- time = event_time('28/Feb/2013:12:00:00:123456789 +0900', format: '%d/%b/%Y:%H:%M:%S:%N %z')
34
- assert_equal_event_time(time, parser.instance.parse('28/Feb/2013:12:00:00:123456789 +0900'))
35
- end
36
-
37
- def test_parse_with_invalid_argument
38
- parser = Fluent::Test::Driver::Parser.new(Fluent::Plugin::Parser::TimeParser.new(nil))
39
-
40
- [[], {}, nil, true, 10000, //, ->{}, '', :symbol].each { |v|
41
- assert_raise Fluent::ParserError do
42
- parser.instance.parse(v)
43
- end
44
- }
45
- end
46
- end