fluentd 0.10.62 → 0.12.0.pre.1

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 (140) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -2
  3. data/.travis.yml +0 -4
  4. data/ChangeLog +0 -72
  5. data/Gemfile +0 -6
  6. data/Rakefile +12 -3
  7. data/example/in_http.conf +14 -0
  8. data/example/in_syslog.conf +15 -0
  9. data/example/in_tail.conf +14 -0
  10. data/example/in_tcp.conf +13 -0
  11. data/example/in_udp.conf +13 -0
  12. data/example/out_copy.conf +20 -0
  13. data/example/out_file.conf +13 -0
  14. data/example/out_forward.conf +30 -0
  15. data/fluent.conf +2 -12
  16. data/fluentd.gemspec +8 -11
  17. data/lib/fluent/agent.rb +180 -0
  18. data/lib/fluent/buffer.rb +6 -12
  19. data/lib/fluent/command/cat.rb +1 -3
  20. data/lib/fluent/command/debug.rb +1 -3
  21. data/lib/fluent/command/fluentd.rb +0 -10
  22. data/lib/fluent/config.rb +9 -3
  23. data/lib/fluent/config/basic_parser.rb +1 -6
  24. data/lib/fluent/config/configure_proxy.rb +25 -61
  25. data/lib/fluent/config/dsl.rb +16 -0
  26. data/lib/fluent/config/element.rb +21 -2
  27. data/lib/fluent/config/error.rb +16 -0
  28. data/lib/fluent/config/literal_parser.rb +9 -27
  29. data/lib/fluent/config/parser.rb +16 -0
  30. data/lib/fluent/config/section.rb +16 -2
  31. data/lib/fluent/config/types.rb +16 -1
  32. data/lib/fluent/config/v1_parser.rb +4 -12
  33. data/lib/fluent/configurable.rb +16 -0
  34. data/lib/fluent/engine.rb +43 -163
  35. data/lib/fluent/env.rb +16 -1
  36. data/lib/fluent/event.rb +20 -48
  37. data/lib/fluent/event_router.rb +187 -0
  38. data/lib/fluent/filter.rb +32 -0
  39. data/lib/fluent/formatter.rb +29 -101
  40. data/lib/fluent/input.rb +6 -4
  41. data/lib/fluent/label.rb +18 -0
  42. data/lib/fluent/load.rb +1 -3
  43. data/lib/fluent/log.rb +1 -3
  44. data/lib/fluent/match.rb +12 -19
  45. data/lib/fluent/mixin.rb +9 -25
  46. data/lib/fluent/output.rb +27 -45
  47. data/lib/fluent/parser.rb +93 -99
  48. data/lib/fluent/plugin.rb +22 -48
  49. data/lib/fluent/plugin/buf_file.rb +10 -7
  50. data/lib/fluent/plugin/buf_memory.rb +2 -3
  51. data/lib/fluent/plugin/buf_zfile.rb +75 -0
  52. data/lib/fluent/plugin/exec_util.rb +16 -0
  53. data/lib/fluent/plugin/in_debug_agent.rb +2 -3
  54. data/lib/fluent/plugin/in_exec.rb +2 -9
  55. data/lib/fluent/plugin/in_forward.rb +4 -22
  56. data/lib/fluent/plugin/in_gc_stat.rb +2 -3
  57. data/lib/fluent/plugin/in_http.rb +19 -59
  58. data/lib/fluent/plugin/in_monitor_agent.rb +21 -47
  59. data/lib/fluent/plugin/in_object_space.rb +2 -3
  60. data/lib/fluent/plugin/in_status.rb +2 -3
  61. data/lib/fluent/plugin/in_stream.rb +6 -16
  62. data/lib/fluent/plugin/in_syslog.rb +8 -17
  63. data/lib/fluent/plugin/in_tail.rb +17 -24
  64. data/lib/fluent/plugin/in_tcp.rb +16 -0
  65. data/lib/fluent/plugin/in_udp.rb +16 -0
  66. data/lib/fluent/plugin/out_copy.rb +3 -4
  67. data/lib/fluent/plugin/out_exec.rb +2 -4
  68. data/lib/fluent/plugin/out_exec_filter.rb +2 -13
  69. data/lib/fluent/plugin/out_file.rb +5 -6
  70. data/lib/fluent/plugin/out_forward.rb +4 -5
  71. data/lib/fluent/plugin/out_null.rb +2 -3
  72. data/lib/fluent/plugin/out_relabel.rb +26 -0
  73. data/lib/fluent/plugin/out_roundrobin.rb +3 -4
  74. data/lib/fluent/plugin/out_stdout.rb +2 -3
  75. data/lib/fluent/plugin/out_stream.rb +2 -3
  76. data/{test/scripts → lib}/fluent/plugin/out_test.rb +2 -3
  77. data/lib/fluent/plugin/socket_util.rb +19 -10
  78. data/lib/fluent/process.rb +4 -6
  79. data/lib/fluent/registry.rb +16 -0
  80. data/lib/fluent/root_agent.rb +212 -0
  81. data/lib/fluent/status.rb +2 -3
  82. data/lib/fluent/supervisor.rb +33 -54
  83. data/lib/fluent/test.rb +16 -0
  84. data/lib/fluent/test/base.rb +3 -17
  85. data/lib/fluent/test/input_test.rb +52 -7
  86. data/lib/fluent/test/output_test.rb +4 -20
  87. data/lib/fluent/version.rb +17 -1
  88. data/spec/config/config_parser_spec.rb +314 -0
  89. data/spec/config/configurable_spec.rb +524 -0
  90. data/spec/config/configure_proxy_spec.rb +96 -0
  91. data/spec/config/dsl_spec.rb +239 -0
  92. data/spec/config/helper.rb +49 -0
  93. data/spec/config/literal_parser_spec.rb +222 -0
  94. data/spec/config/section_spec.rb +97 -0
  95. data/spec/config/system_config_spec.rb +49 -0
  96. data/test/helper.rb +0 -25
  97. data/test/plugin/test_in_exec.rb +1 -1
  98. data/test/plugin/test_in_forward.rb +2 -1
  99. data/test/plugin/test_in_gc_stat.rb +1 -1
  100. data/test/plugin/test_in_http.rb +3 -78
  101. data/test/plugin/test_in_object_space.rb +1 -1
  102. data/test/plugin/test_in_status.rb +1 -1
  103. data/test/plugin/test_in_stream.rb +2 -1
  104. data/test/plugin/test_in_syslog.rb +2 -1
  105. data/test/plugin/test_in_tail.rb +6 -11
  106. data/test/plugin/test_in_tcp.rb +2 -1
  107. data/test/plugin/test_in_udp.rb +2 -1
  108. data/test/plugin/test_out_copy.rb +1 -12
  109. data/test/plugin/test_out_exec.rb +1 -1
  110. data/test/plugin/test_out_exec_filter.rb +1 -1
  111. data/test/plugin/test_out_file.rb +7 -96
  112. data/test/plugin/test_out_forward.rb +2 -1
  113. data/test/plugin/test_out_roundrobin.rb +1 -12
  114. data/test/plugin/test_out_stdout.rb +1 -1
  115. data/test/plugin/test_out_stream.rb +2 -1
  116. data/test/scripts/fluent/plugin/formatter_known.rb +1 -4
  117. data/test/scripts/fluent/plugin/parser_known.rb +1 -2
  118. data/test/test_config.rb +1 -1
  119. data/test/test_configdsl.rb +2 -1
  120. data/test/test_formatter.rb +3 -395
  121. data/test/test_match.rb +2 -1
  122. data/test/test_mixin.rb +3 -75
  123. data/test/test_output.rb +1 -112
  124. data/test/test_parser.rb +85 -152
  125. metadata +58 -167
  126. data/example/v1_literal_example.conf +0 -36
  127. data/lib/fluent/plugin/in_dummy.rb +0 -103
  128. data/lib/fluent/timezone.rb +0 -131
  129. data/test/config/assertions.rb +0 -42
  130. data/test/config/test_config_parser.rb +0 -389
  131. data/test/config/test_configurable.rb +0 -652
  132. data/test/config/test_configure_proxy.rb +0 -99
  133. data/test/config/test_dsl.rb +0 -237
  134. data/test/config/test_literal_parser.rb +0 -295
  135. data/test/config/test_section.rb +0 -112
  136. data/test/config/test_system_config.rb +0 -99
  137. data/test/config/test_types.rb +0 -63
  138. data/test/plugin/test_in_dummy.rb +0 -95
  139. data/test/test_event.rb +0 -168
  140. data/test/test_input.rb +0 -21
@@ -0,0 +1,97 @@
1
+ require 'fluent/config/section'
2
+
3
+ describe Fluent::Config::Section do
4
+ context 'class' do
5
+ describe '.name' do
6
+ it 'returns its full module name as String' do
7
+ expect(Fluent::Config::Section.name).to eql('Fluent::Config::Section')
8
+ end
9
+ end
10
+ end
11
+
12
+ context 'instance object' do
13
+ describe '#initialize' do
14
+ it 'creates blank object without argument' do
15
+ s = Fluent::Config::Section.new
16
+ expect(s.instance_eval{ @params }).to eql({})
17
+ end
18
+
19
+ it 'creates object which contains specified hash object itself' do
20
+ hash = {
21
+ name: 'tagomoris',
22
+ age: 34,
23
+ send: 'email',
24
+ class: 'normal',
25
+ keys: 5,
26
+ }
27
+ s1 = Fluent::Config::Section.new(hash)
28
+ expect(s1.instance_eval{ @params }).to eq(hash)
29
+ expect(s1[:name]).to eql("tagomoris")
30
+ expect(s1[:age]).to eql(34)
31
+ expect(s1[:send]).to eql("email")
32
+ expect(s1[:class]).to eql("normal")
33
+ expect(s1[:keys]).to eql(5)
34
+
35
+ expect(s1.name).to eql("tagomoris")
36
+ expect(s1.age).to eql(34)
37
+ expect(s1.send).to eql("email")
38
+ expect(s1.class).to eql("normal")
39
+ expect(s1.keys).to eql(5)
40
+
41
+ expect{ s1.dup }.to raise_error(NoMethodError)
42
+ end
43
+ end
44
+
45
+ describe '#to_h' do
46
+ it 'returns internal hash itself' do
47
+ hash = {
48
+ name: 'tagomoris',
49
+ age: 34,
50
+ send: 'email',
51
+ class: 'normal',
52
+ keys: 5,
53
+ }
54
+ s = Fluent::Config::Section.new(hash)
55
+ expect(s.to_h).to eq(hash)
56
+ expect(s.to_h.class).to eq(Hash)
57
+ end
58
+ end
59
+
60
+ describe '#instance_of?' do
61
+ it 'can judge whether it is a Section object or not' do
62
+ s = Fluent::Config::Section.new
63
+ expect(s.instance_of?(Fluent::Config::Section)).to be true
64
+ expect(s.instance_of?(BasicObject)).to be false
65
+ end
66
+ end
67
+
68
+ describe '#is_a?' do
69
+ it 'can judge whether it belongs to or not' do
70
+ s = Fluent::Config::Section.new
71
+ expect(s.is_a?(Fluent::Config::Section)).to be true
72
+ expect(s.kind_of?(Fluent::Config::Section)).to be true
73
+ expect(s.is_a?(BasicObject)).to be true
74
+ end
75
+ end
76
+
77
+ describe '#+' do
78
+ it 'can merge 2 sections: argument side is primary, internal hash is newly created' do
79
+ h1 = {name: "s1", num: 10, class: "A"}
80
+ s1 = Fluent::Config::Section.new(h1)
81
+
82
+ h2 = {name: "s2", class: "A", num2: "5", num3: "8"}
83
+ s2 = Fluent::Config::Section.new(h2)
84
+ s = s1 + s2
85
+
86
+ expect(s.to_h.object_id).not_to eq(h1.object_id)
87
+ expect(s.to_h.object_id).not_to eq(h2.object_id)
88
+
89
+ expect(s.name).to eql("s2")
90
+ expect(s.num).to eql(10)
91
+ expect(s.class).to eql("A")
92
+ expect(s.num2).to eql("5")
93
+ expect(s.num3).to eql("8")
94
+ end
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,49 @@
1
+ require 'fluent/configurable'
2
+ require 'fluent/config/element'
3
+ require 'fluent/config/section'
4
+ require 'fluent/supervisor'
5
+
6
+ describe Fluent::Supervisor::SystemConfig do
7
+ def parse_text(text)
8
+ basepath = File.expand_path(File.dirname(__FILE__) + '/../../')
9
+ Fluent::Config.parse(text, '(test)', basepath, true).elements.find { |e| e.name == 'system' }
10
+ end
11
+
12
+ it 'should not override default configurations when no parameters' do
13
+ conf = parse_text(<<EOS)
14
+ <system>
15
+ </system>
16
+ EOS
17
+ sc = Fluent::Supervisor::SystemConfig.new(conf)
18
+ expect(sc.log_level).to be_nil
19
+ expect(sc.suppress_repeated_stacktrace).to be_nil
20
+ expect(sc.emit_error_log_interval).to be_nil
21
+ expect(sc.suppress_config_dump).to be_nil
22
+ expect(sc.without_source).to be_nil
23
+ expect(sc.to_opt).to eql({})
24
+ end
25
+
26
+ {'log_level' => 'error', 'suppress_repeated_stacktrace' => true, 'emit_error_log_interval' => 60, 'suppress_config_dump' => true, 'without_source' => true}.each { |k, v|
27
+ it "accepts #{k} parameter" do
28
+ conf = parse_text(<<EOS)
29
+ <system>
30
+ #{k} #{v}
31
+ </system>
32
+ EOS
33
+ sc = Fluent::Supervisor::SystemConfig.new(conf)
34
+ expect(sc.instance_variable_get("@#{k}")).not_to be_nil
35
+ if k == 'emit_error_log_interval'
36
+ expect(sc.to_opt).to include(:suppress_interval)
37
+ else
38
+ expect(sc.to_opt).to include(k.to_sym)
39
+ end
40
+ end
41
+ }
42
+
43
+ {'foo' => 'bar', 'hoge' => 'fuga'}.each { |k, v|
44
+ it "should not affect settable parameters with unknown #{k} parameter" do
45
+ sc = Fluent::Supervisor::SystemConfig.new({k => v})
46
+ expect(sc.to_opt).to be_empty
47
+ end
48
+ }
49
+ end
data/test/helper.rb CHANGED
@@ -1,28 +1,3 @@
1
- # simplecov must be loaded before any of target code
2
- if ENV['SIMPLE_COV']
3
- require 'simplecov'
4
- if defined?(SimpleCov::SourceFile)
5
- mod = SimpleCov::SourceFile
6
- def mod.new(*args, &block)
7
- m = allocate
8
- m.instance_eval do
9
- begin
10
- initialize(*args, &block)
11
- rescue Encoding::UndefinedConversionError
12
- @src = "".force_encoding('UTF-8')
13
- end
14
- end
15
- m
16
- end
17
- end
18
- unless SimpleCov.running
19
- SimpleCov.start do
20
- add_filter '/test/'
21
- add_filter '/gems/'
22
- end
23
- end
24
- end
25
-
26
1
  require 'test/unit'
27
2
  require 'fileutils'
28
3
  require 'fluent/log'
@@ -1,4 +1,4 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
2
  require 'net/http'
3
3
 
4
4
  class ExecInputTest < Test::Unit::TestCase
@@ -1,4 +1,5 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
+ require 'helper'
2
3
 
3
4
  class ForwardInputTest < Test::Unit::TestCase
4
5
  def setup
@@ -1,4 +1,4 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
2
 
3
3
  class GCStatInputTest < Test::Unit::TestCase
4
4
  def setup
@@ -1,4 +1,5 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
+ require 'helper'
2
3
  require 'net/http'
3
4
 
4
5
  class HttpInputTest < Test::Unit::TestCase
@@ -12,7 +13,6 @@ class HttpInputTest < Test::Unit::TestCase
12
13
  bind "127.0.0.1"
13
14
  body_size_limit 10m
14
15
  keepalive_timeout 5
15
- respond_with_empty_img true
16
16
  ]
17
17
 
18
18
  def create_driver(conf=CONFIG)
@@ -157,7 +157,7 @@ class HttpInputTest < Test::Unit::TestCase
157
157
 
158
158
  def test_with_regexp
159
159
  d = create_driver(CONFIG + %[
160
- format /^(?<field_1>\\d+):(?<field_2>\\w+)$/
160
+ format /^(?<field_1>\\\\d+):(?<field_2>\\\\w+)$/
161
161
  types field_1:integer
162
162
  ])
163
163
 
@@ -199,81 +199,6 @@ class HttpInputTest < Test::Unit::TestCase
199
199
  end
200
200
  end
201
201
 
202
- def test_resonse_with_empty_img
203
- d = create_driver(CONFIG + "respond_with_empty_img true")
204
- assert_equal true, d.instance.respond_with_empty_img
205
-
206
- time = Time.parse("2011-01-02 13:14:15 UTC").to_i
207
-
208
- d.expect_emit "tag1", time, {"a"=>1}
209
- d.expect_emit "tag2", time, {"a"=>2}
210
-
211
- d.run do
212
- d.expected_emits.each {|tag,time,record|
213
- res = post("/#{tag}", {"json"=>record.to_json, "time"=>time.to_s})
214
- assert_equal "200", res.code
215
- # Ruby returns ASCII-8 encoded string for GIF.
216
- assert_equal Fluent::HttpInput::EMPTY_GIF_IMAGE, res.body.force_encoding("UTF-8")
217
- }
218
- end
219
- end
220
-
221
- def test_if_content_type_is_initialized_properly
222
- # This test is to check if Fluent::HttpInput::Handler's @content_type is initialized properly.
223
- # Especially when in Keep-Alive and the second request has no 'Content-Type'.
224
- #
225
- # Actually, in the current implementation of in_http, we can't test it directly.
226
- # So we replace Fluent::HttpInput::Handler temporally with the extended Handler
227
- # in order to collect @content_type(s) per request.
228
- # Finally, we check those collected @content_type(s).
229
-
230
- # Save the original Handler
231
- orig_handler = Fluent::HttpInput::Handler
232
-
233
- begin
234
- # Create the extended Handler which can store @content_type per request
235
- ext_handler = Class.new(Fluent::HttpInput::Handler) do
236
- @@content_types = []
237
-
238
- def self.content_types
239
- @@content_types
240
- end
241
-
242
- def on_message_complete
243
- @@content_types << @content_type
244
- super
245
- end
246
- end
247
-
248
- # Replace the original Handler temporally with the extended one
249
- Fluent::HttpInput.module_eval do
250
- remove_const(:Handler) if const_defined?(:Handler)
251
- const_set(:Handler, ext_handler)
252
- end
253
-
254
- d = create_driver
255
-
256
- d.run do
257
- # Send two requests the second one has no Content-Type in Keep-Alive
258
- Net::HTTP.start("127.0.0.1", PORT) do |http|
259
- req = Net::HTTP::Post.new("/foodb/bartbl", {"connection" => "keepalive", "content-type" => "application/json"})
260
- res = http.request(req)
261
-
262
- req = Net::HTTP::Get.new("/foodb/bartbl", {"connection" => "keepalive"})
263
- res = http.request(req)
264
- end
265
-
266
- assert_equal(['application/json', ''], ext_handler.content_types)
267
- end
268
- ensure
269
- # Revert the original Handler
270
- Fluent::HttpInput.module_eval do
271
- remove_const(:Handler) if const_defined?(:Handler)
272
- const_set(:Handler, orig_handler)
273
- end
274
- end
275
- end
276
-
277
202
  def post(path, params, header = {})
278
203
  http = Net::HTTP.new("127.0.0.1", PORT)
279
204
  req = Net::HTTP::Post.new(path, header)
@@ -1,4 +1,4 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
2
 
3
3
  class ObjectSpaceInputTest < Test::Unit::TestCase
4
4
  class FailObject
@@ -1,4 +1,4 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
2
 
3
3
  class StatusInputTest < Test::Unit::TestCase
4
4
  def setup
@@ -1,4 +1,5 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
+ require 'helper'
2
3
 
3
4
  module StreamInputTest
4
5
  def setup
@@ -1,4 +1,5 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
+ require 'helper'
2
3
 
3
4
  class SyslogInputTest < Test::Unit::TestCase
4
5
  def setup
@@ -1,4 +1,4 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
2
  require 'net/http'
3
3
  require 'flexmock'
4
4
 
@@ -388,11 +388,6 @@ class TailInputTest < Test::Unit::TestCase
388
388
  timeclass.should_receive(:now).with_no_args.and_return(Time.new(2010, 1, 2, 3, 4, 5))
389
389
  assert_equal EX_PATHS, plugin.expand_paths.sort
390
390
  end
391
-
392
- # Test exclusion
393
- exclude_config = EX_CONFIG + " exclude_path [\"#{EX_PATHS.last}\"]"
394
- plugin = create_driver(exclude_config, false).instance
395
- assert_equal EX_PATHS - [EX_PATHS.last], plugin.expand_paths.sort
396
391
  end
397
392
 
398
393
  def test_refresh_watchers
@@ -445,7 +440,7 @@ class TailInputTest < Test::Unit::TestCase
445
440
 
446
441
  def test_receive_lines
447
442
  plugin = create_driver(EX_CONFIG, false).instance
448
- flexstub(Fluent::Engine) do |engineclass|
443
+ flexstub(plugin.router) do |engineclass|
449
444
  engineclass.should_receive(:emit_stream).with('tail', any).once
450
445
  plugin.receive_lines(['foo', 'bar'], DummyWatcher.new('foo.bar.log'))
451
446
  end
@@ -457,7 +452,7 @@ class TailInputTest < Test::Unit::TestCase
457
452
  read_from_head true
458
453
  ]
459
454
  plugin = create_driver(config, false).instance
460
- flexstub(Fluent::Engine) do |engineclass|
455
+ flexstub(plugin.router) do |engineclass|
461
456
  engineclass.should_receive(:emit_stream).with('pre.foo.bar.log', any).once
462
457
  plugin.receive_lines(['foo', 'bar'], DummyWatcher.new('foo.bar.log'))
463
458
  end
@@ -469,7 +464,7 @@ class TailInputTest < Test::Unit::TestCase
469
464
  read_from_head true
470
465
  ]
471
466
  plugin = create_driver(config, false).instance
472
- flexstub(Fluent::Engine) do |engineclass|
467
+ flexstub(plugin.router) do |engineclass|
473
468
  engineclass.should_receive(:emit_stream).with('foo.bar.log.post', any).once
474
469
  plugin.receive_lines(['foo', 'bar'], DummyWatcher.new('foo.bar.log'))
475
470
  end
@@ -481,7 +476,7 @@ class TailInputTest < Test::Unit::TestCase
481
476
  read_from_head true
482
477
  ]
483
478
  plugin = create_driver(config, false).instance
484
- flexstub(Fluent::Engine) do |engineclass|
479
+ flexstub(plugin.router) do |engineclass|
485
480
  engineclass.should_receive(:emit_stream).with('pre.foo.bar.log.post', any).once
486
481
  plugin.receive_lines(['foo', 'bar'], DummyWatcher.new('foo.bar.log'))
487
482
  end
@@ -493,7 +488,7 @@ class TailInputTest < Test::Unit::TestCase
493
488
  read_from_head true
494
489
  ]
495
490
  plugin = create_driver(config, false).instance
496
- flexstub(Fluent::Engine) do |engineclass|
491
+ flexstub(plugin.router) do |engineclass|
497
492
  engineclass.should_receive(:emit_stream).with('pre.foo.bar.log.post', any).once
498
493
  plugin.receive_lines(['foo', 'bar'], DummyWatcher.new('foo.bar.log'))
499
494
  end
@@ -1,4 +1,5 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
+ require 'helper'
2
3
 
3
4
  class TcpInputTest < Test::Unit::TestCase
4
5
  def setup
@@ -1,4 +1,5 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
+ require 'helper'
2
3
 
3
4
  class UdpInputTest < Test::Unit::TestCase
4
5
  def setup
@@ -1,17 +1,6 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
2
 
3
3
  class CopyOutputTest < Test::Unit::TestCase
4
- class << self
5
- def startup
6
- $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'scripts'))
7
- require 'fluent/plugin/out_test'
8
- end
9
-
10
- def shutdown
11
- $LOAD_PATH.shift
12
- end
13
- end
14
-
15
4
  def setup
16
5
  Fluent::Test.setup
17
6
  end
@@ -1,4 +1,4 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
2
  require 'fileutils'
3
3
 
4
4
  class ExecOutputTest < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require_relative '../helper'
1
+ require 'fluent/test'
2
2
  require 'fileutils'
3
3
 
4
4
  class ExecFilterOutputTest < Test::Unit::TestCase