Sha256: 87d596d6750a49d42a5629fe3d1b2fc251225a829ab91a78485886bab39e8a9a
Contents?: true
Size: 888 Bytes
Versions: 1
Compression:
Stored size: 888 Bytes
Contents
require 'helper' class ExecPlaceholderOutputTest < Test::Unit::TestCase def setup Fluent::Test.setup end CONFIG = %[ ] def create_driver(conf = CONFIG, tag='test') Fluent::Test::OutputTestDriver.new(Fluent::ExecPlaceholderOutput, tag).configure(conf) end def test_configure d = create_driver(CONFIG + "\noutput_type json") assert_equal :json, d.instance.output_type assert_raise(Fluent::ConfigError) do d = create_driver(CONFIG) end end def test_emit d1 = create_driver(CONFIG, 'input.access') d1.run do d1.emit({'domain' => 'www.google.com', 'path' => '/foo/bar?key=value', 'agent' => 'Googlebot', 'response_time' => 1000000}) d1.emit({'domain' => 'news.google.com', 'path' => '/', 'agent' => 'Googlebot-Mobile', 'response_time' => 900000}) end emits = d1.emits assert_equal 5, emits.length end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-exec_placeholder-0.0.1 | test/plugin/test_out_exec_placeholder.rb |