Navigation Menu

Skip to content

Commit

Permalink
test: include Fluent::Test::Helpers at top-level
Browse files Browse the repository at this point in the history
It's a Fluentd style.
  • Loading branch information
kou committed Apr 24, 2017
1 parent c6420c3 commit 669fbb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
5 changes: 4 additions & 1 deletion test/run-test.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
#
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
# Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -31,6 +31,9 @@
$LOAD_PATH.unshift(lib_dir)

require "fluent/test"
require "fluent/test/helpers"

include Fluent::Test::Helpers

ENV["TEST_UNIT_MAX_DIFF_TARGET_STRING_SIZE"] ||= "5000"

Expand Down
10 changes: 2 additions & 8 deletions test/test_input.rb
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
# Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand All @@ -21,15 +19,11 @@
require "webrick/config"
require "webrick/httpresponse"

require "fluent/test"
require "fluent/test/helpers"
require "fluent/plugin/in_groonga"

require "http_parser"

class GroongaInputTest < Test::Unit::TestCase
include Fluent::Test::Helpers

setup :before => :append
def setup_fluent
Fluent::Test.setup
Expand All @@ -39,7 +33,7 @@ def setup_fluent

private
def create_driver
driver = Fluent::Test::InputTestDriver.new(Fluent::GroongaInput)
driver = Fluent::Test::InputTestDriver.new(Fluent::Plugin::GroongaInput)
driver.configure(configuration)
driver
end
Expand Down
8 changes: 1 addition & 7 deletions test/test_output.rb
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
# Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand All @@ -21,16 +19,12 @@
require "webrick/config"
require "webrick/httpresponse"

require "fluent/test"
require "fluent/test/driver/output"
require "fluent/test/helpers"
require "fluent/plugin/out_groonga"

require "http_parser"

class GroongaOutputTest < Test::Unit::TestCase
include Fluent::Test::Helpers

setup :before => :append
def setup_fluent
Fluent::Test.setup
Expand Down

0 comments on commit 669fbb1

Please sign in to comment.