Skip to content

Commit

Permalink
test: declare that test case use v0.10 explicitly
Browse files Browse the repository at this point in the history
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 <system> support raises
the following exception:

  Failure: test_inline(ConfigTest):
    Exception raised:
    Fluent::ConfigParseError(<expected end tag '</include>' but got end of file at config_test_1.conf line 11,10
     10:   port 2222
     11:  </source>
         ----------^
    >)

Signed-off-by: Kentaro Hayashi <[email protected]>
  • Loading branch information
kenhys committed May 11, 2021
1 parent d62d579 commit 6a96a9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def test_inline
prepare_config
opts = {
:config_path => "#{TMP_DIR}/config_test_1.conf",
:inline_config => "<source>\n type http\n port 2222\n </source>"
:inline_config => "<source>\n type http\n port 2222\n </source>",
:use_v1_config => false
}
assert_nothing_raised do
Fluent::Supervisor.new(opts)
Expand Down

0 comments on commit 6a96a9f

Please sign in to comment.