-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1057 from okkez/migrate-v0.14-api-out_null
Migrate out_null plugin to v0.14 API
- Loading branch information
Showing
4 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require_relative '../helper' | ||
require 'fluent/test/driver/output' | ||
require 'fluent/plugin/out_null' | ||
|
||
class NullOutputTest < Test::Unit::TestCase | ||
def setup | ||
Fluent::Test.setup | ||
end | ||
|
||
def create_driver(conf = "") | ||
Fluent::Test::Driver::Output.new(Fluent::Plugin::NullOutput).configure(conf) | ||
end | ||
|
||
def test_configure | ||
assert_nothing_raised do | ||
create_driver | ||
end | ||
end | ||
|
||
def test_process | ||
d = create_driver | ||
assert_nothing_raised do | ||
d.run do | ||
d.feed("test", Fluent::EventTime.now, {"test" => "null"}) | ||
end | ||
end | ||
assert_equal([], d.events(tag: "test")) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters