From 9eb847359d002a732930880497209f0464e2c601 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Tue, 28 Nov 2017 11:48:11 -0800 Subject: [PATCH] Fix rubocop offenses --- Rakefile | 2 +- test/plugin/test_in_systemd.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 20c4cee..7af457d 100644 --- a/Rakefile +++ b/Rakefile @@ -14,7 +14,7 @@ task build: "docker:test" task default: :reevoocop namespace :docker do - distros = [:ubuntu, :"tdagent-ubuntu", :"tdagent-centos"] + distros = %i[ubuntu tdagent-ubuntu tdagent-centos] task test: distros distros.each do |distro| diff --git a/test/plugin/test_in_systemd.rb b/test/plugin/test_in_systemd.rb index dd0e5b8..d13bbab 100644 --- a/test/plugin/test_in_systemd.rb +++ b/test/plugin/test_in_systemd.rb @@ -43,7 +43,8 @@ def setup ) end - attr_reader :journal, :base_config, :pos_path, :pos_config, :head_config, :filter_config, :strip_config, :tail_config, :badmsg_config + attr_reader :journal, :base_config, :pos_path, :pos_config, :head_config, + :filter_config, :strip_config, :tail_config, :badmsg_config def create_driver(config) Fluent::Test::InputTestDriver.new(Fluent::SystemdInput).configure(config) @@ -118,7 +119,6 @@ def test_reading_from_the_journal_tail_with_strip_underscores d.run end - def test_pos_file_is_written d = create_driver(pos_config) d.run @@ -146,7 +146,7 @@ def test_reading_from_a_pos assert_equal 143, d.emits.size end - def test_reading_from_an_invalid_pos # rubocop:disable Metrics/AbcSize + def test_reading_from_an_invalid_pos file = File.open(pos_path, "w+") file.print "thisisinvalid" file.close