Sha256: 5c8d4d3d4fc0a1b24ba6d9fddd6eee0ddd8a6f58f42114d314e5fec30c14c316

Contents?: true

Size: 813 Bytes

Versions: 44

Compression:

Stored size: 813 Bytes

Contents

require_relative 'helper'
require 'fluent/input'

class FluentInputTest < ::Test::Unit::TestCase
  include Fluent

  def setup
    Fluent::Test.setup
  end

  def create_driver(conf = '')
    Fluent::Test::InputTestDriver.new(Fluent::Input).configure(conf, true)
  end

  def test_router
    d = create_driver
    assert_equal Engine.root_agent.event_router, d.instance.router

    d = nil
    assert_nothing_raised { 
      d = create_driver('@label @known')
    }
    expected = Engine.root_agent.find_label('@known').event_router
    assert_equal expected, d.instance.router

    # TestDriver helps to create a label instance automatically, so directly test here
    assert_raise(ArgumentError) {
      Fluent::Input.new.configure(Config.parse('@label @unknown', '(test)', '(test_dir)', true))
    }
  end
end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
fluentd-0.12.43 test/test_input.rb
fluentd-0.12.42 test/test_input.rb
fluentd-0.12.41 test/test_input.rb
fluentd-0.12.40 test/test_input.rb
fluentd-0.12.39 test/test_input.rb
fluentd-0.12.38 test/test_input.rb
fluentd-0.12.37 test/test_input.rb
fluentd-0.12.36 test/test_input.rb
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/fluentd-0.12.35/test/test_input.rb
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/fluentd-0.12.35/test/test_input.rb
fluentd-0.12.35 test/test_input.rb
fluentd-0.12.34 test/test_input.rb
fluentd-0.12.33 test/test_input.rb
fluentd-0.12.32 test/test_input.rb
fluentd-0.12.31 test/test_input.rb
fluentd-0.12.30 test/test_input.rb
fluentd-0.12.29 test/test_input.rb
fluentd-0.12.28 test/test_input.rb
fluentd-0.12.27 test/test_input.rb
fluentd-0.12.26 test/test_input.rb