From c7e188528bf50b28bf27ad656781567d1dced5e1 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Wed, 20 Feb 2019 15:07:41 +0900 Subject: [PATCH] Fix test for multi workers assign syntax on RootAgent --- test/test_root_agent.rb | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/test/test_root_agent.rb b/test/test_root_agent.rb index 054dc1fbdc..73ecd601c3 100644 --- a/test/test_root_agent.rb +++ b/test/test_root_agent.rb @@ -893,30 +893,16 @@ def configure_ra(conf_str) refute ra.error_collector end - test 'with plugins for workers syntax' do + test 'with plugins for workers syntax should match worker_id equals to 2' do conf = <<-EOC - - - @type tcp - tag test.worker_group1 - - @type none - - - - @type stdout - - - - - + @type forward + + @type test_filter + @id test_filter + @type stdout @@ -927,12 +913,12 @@ def configure_ra(conf_str) EOC + ra = configure_ra(conf) - assert_equal 0, ra.inputs.size - assert_equal 0, ra.outputs.size - assert_equal 0, ra.filters.size - assert_equal 0, ra.labels.size - refute ra.error_collector + assert_kind_of Fluent::Plugin::ForwardInput, ra.inputs.first + assert_kind_of Fluent::Plugin::StdoutOutput, ra.outputs.first + assert_kind_of FluentTestFilter, ra.filters.first + assert ra.error_collector end end end