From 6a96a9fe4bb21b5fc6402c2b8231cfed76ede89f Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Mon, 10 May 2021 16:45:18 +0900 Subject: [PATCH] test: declare that test case use v0.10 explicitly In the previous versions, Fluent::Supervisor.new(opts) doesn't parse content actually at that time, so it doesn't care whether v0 or v1 parser is used. But, by introducing support for log rotation configuration, it was changed to fetch rotate_age and rotate_size in early stage because these parameters must be passed to LogInitializer during initialization steps, so configuration file is changed to parse in Fluent::Supervisor.new(opts). As a result, we need to pass additional parameter for this test case. Without this fix, log rotate configuration in support raises the following exception: Failure: test_inline(ConfigTest): Exception raised: Fluent::ConfigParseError(' but got end of file at config_test_1.conf line 11,10 10: port 2222 11: ----------^ >) Signed-off-by: Kentaro Hayashi --- test/test_config.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_config.rb b/test/test_config.rb index 1efb79edd2..e9d1005647 100644 --- a/test/test_config.rb +++ b/test/test_config.rb @@ -160,7 +160,8 @@ def test_inline prepare_config opts = { :config_path => "#{TMP_DIR}/config_test_1.conf", - :inline_config => "\n type http\n port 2222\n " + :inline_config => "\n type http\n port 2222\n ", + :use_v1_config => false } assert_nothing_raised do Fluent::Supervisor.new(opts)