fluentd 1.12.4-x86-mingw32 → 1.13.0-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.

data/test/test_config.rb CHANGED
@@ -160,7 +160,8 @@ class ConfigTest < Test::Unit::TestCase
160
160
  prepare_config
161
161
  opts = {
162
162
  :config_path => "#{TMP_DIR}/config_test_1.conf",
163
- :inline_config => "<source>\n type http\n port 2222\n </source>"
163
+ :inline_config => "<source>\n type http\n port 2222\n </source>",
164
+ :use_v1_config => false
164
165
  }
165
166
  assert_nothing_raised do
166
167
  Fluent::Supervisor.new(opts)
@@ -7,6 +7,7 @@ require_relative 'test_plugin_classes'
7
7
  require 'net/http'
8
8
  require 'uri'
9
9
  require 'fileutils'
10
+ require 'tempfile'
10
11
 
11
12
  if Fluent.windows?
12
13
  require 'win32/event'
@@ -489,6 +490,40 @@ class SupervisorTest < ::Test::Unit::TestCase
489
490
  assert_equal 10, $log.out.instance_variable_get(:@shift_size)
490
491
  end
491
492
 
493
+ sub_test_case "system log rotation" do
494
+ def parse_text(text)
495
+ basepath = File.expand_path(File.dirname(__FILE__) + '/../../')
496
+ Fluent::Config.parse(text, '(test)', basepath, true).elements.find { |e| e.name == 'system' }
497
+ end
498
+
499
+ def test_override_default_log_rotate
500
+ Tempfile.open do |file|
501
+ config = parse_text(<<-EOS)
502
+ <system>
503
+ <log>
504
+ rotate_age 3
505
+ rotate_size 300
506
+ </log>
507
+ </system>
508
+ EOS
509
+ file.puts(config)
510
+ file.flush
511
+ opts = Fluent::Supervisor.default_options.merge(
512
+ log_path: "#{TMP_DIR}/test.log", config_path: file.path
513
+ )
514
+ sv = Fluent::Supervisor.new(opts)
515
+
516
+ log = sv.instance_variable_get(:@log)
517
+ log.init(:standalone, 0)
518
+ logger = $log.instance_variable_get(:@logger)
519
+
520
+ assert_equal([3, 300],
521
+ [logger.instance_variable_get(:@rotate_age),
522
+ logger.instance_variable_get(:@rotate_size)])
523
+ end
524
+ end
525
+ end
526
+
492
527
  def test_inline_config
493
528
  omit 'this feature is deprecated. see https://github.com/fluent/fluentd/issues/2711'
494
529
 
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.12.4
4
+ version: 1.13.0
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: 2021-05-26 00:00:00.000000000 Z
11
+ date: 2021-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -792,6 +792,7 @@ files:
792
792
  - test/command/test_binlog_reader.rb
793
793
  - test/command/test_ca_generate.rb
794
794
  - test/command/test_cap_ctl.rb
795
+ - test/command/test_cat.rb
795
796
  - test/command/test_ctl.rb
796
797
  - test/command/test_fluentd.rb
797
798
  - test/command/test_plugin_config_formatter.rb
@@ -1030,6 +1031,7 @@ test_files:
1030
1031
  - test/command/test_binlog_reader.rb
1031
1032
  - test/command/test_ca_generate.rb
1032
1033
  - test/command/test_cap_ctl.rb
1034
+ - test/command/test_cat.rb
1033
1035
  - test/command/test_ctl.rb
1034
1036
  - test/command/test_fluentd.rb
1035
1037
  - test/command/test_plugin_config_formatter.rb